What if you forget your MySQL password one day? Of course I hope this kind of thing doesn't happen, if it happens, follow.
me! Tell you how to modify your MySQL password without completely forgetting the MySQL password
First: We have to turn off the MySQL service and we can use PS aux | grep MySQL finds the process number and kills it.
# kill-9 MySQL Process number
Second: Start MySQL with--skip-grant-table parameters
# Mysql_safe--skip-grant-table&
Third: We can change the password, assuming the change to Mysqlpassword
# mysql MySQL
mysql> Update user Set Password=password (' Mysqlpassword ') where user= ' root ';
mysql> flush Privileges;
Mysql> exit
Last: We turn off the MySQL service running in the background again
#kill-9 MySQL process number
#/service mysqld Start
# Mysql-uroot-pmysqlpassword
This article from "Like Rain like fog and like Wind" blog, please be sure to keep this source http://31521194.blog.51cto.com/10762166/1739460
What to do if MySQL loses or forgets a password under UNIX