开发者

How to change root password to an empty one? [duplicate]

This question already has answers here: How to set root password to null (21 answers) Closed 9 years ago.

How can I change the root password to an empty one in MySql?

The following gives "Access denied for user 'root'@'localhost' (using password: YES)" error. I'm sure I've typed my password correct (it's only 123456)

mysqladmin -u root -p'123456' password ''

I've run this sql successfully but I c开发者_C百科an still access with my password 123456 and not with an empty one:

use mysql; update user set password=PASSWORD("") where User='root';


You should restart the MySQL server or run the following command:

FLUSH PRIVILEGES;

MySQL doesn't immediately "see" the changes you make to the tables containing user account data, hence the need for this additional step.


You need to FLUSH PRIVILEGES.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜