Reset MySQL root password

February 21, 2012 by SLJ | Category:MySQL | 1 Comment Font size: AA   AA

Logged in?

1:use mysql
2:update user set password=password(‘newpass’) where user=’root’;
3:flush privileges;

Forget the root password?
service mysqld stop
mysqld_safe –skip-grant-tables &

======

Another way:

mysqladmin -u root -p newpass

then type in your old password in the next line.

 

Other Posts / 其他文章



1 Comment

我要评论
  • 淘宝论坛 February 25, 2012

    英文不好的路过一下

Leave a Comment:

*
*
*
*

↑ Top