1, this way will make the server in an insecure situation, please try to ensure that in a safe environment, because, this way, will allow anyone to arbitrarily connect MySQL database.
2, #vim/etc/my.cnf
In the section "Mysqld", add skip-grant-tables
Save and exit.
3. Restart Mysqld
#service mysqld Restart
Will prompt stopping mysql:[OK]
Starting mysql:[OK]
4. Log in and modify the root password of MySQL
#mysql
Mysql>use MySQL
Mysql>updateuser Set Password = password (' Your password ') where user = ' root ';
Prompt for query OK, 3 rows Affected (0.00 sec)
Rows Matched:3 Changed:3 warnings:0
5, successful, password reset success.
6, this article according to
Http://www.cnblogs.com/sbaicl/articles/3132010.html
After the success of the practice, it is not the original, but a word a loadline out.
Hundred Cattle Information Technology Bainiu.ltd organized and published in the blog Park
Forgot MySQL password under centos6.5