Help

Welcome!

This community is for professionals and enthusiasts of our products and services.
Share and discuss the best content and new marketing ideas, build your professional profile and become a better marketer together.

0

安装mysql修改root密码出现1064(42000)错误

Avatar
Administrator

错误:mysql> set password = password('新密码')

ERROR 1064 (42000): You have an

corresponds to your MySQL server

ord(`lihaiming1992`)' at line 1


 


1、解决方式:


SET PASSWORD = '123456'


2、解决方式:


ALTER USER 'root'@'localhost' IDENTIFIED BY '123456';

————————————————

在MySQL中,为了区分MySQL的关键字与普通字符,MySQL引入了一个反引号。
在上述的sql语句中,数据库名称使用的是单引号而不是反引号,所以会就报了这个错误出来。修改后为:

CREATE DATABASE `xiaoyaoji` CHARACTER SET utf8; 

在英文键盘输入环境下,按图示按钮输入反引号 `




Avatar
Discard