Deadlock condition

Recover MySQL root Password


You can recover MySQL database server password with following five easy steps.

step #1:
     # /etc/init.d/mysql stop
step #2:
   # mysqld_safe --skip-grant-tables
while mysql deamon is working you should open a new terminal window and write down next command.

step #3:
   # mysql -u root
step #4:
   mysql> update user set password=PASSWORD("NEW-ROOT-PASSWORD") where User='root';
   mysql> flush privileges;
   mysql> quit
step #5:
   After we are killing the process of deamon
In the END :
   # /etc/init.d/mysql start
   # mysql -u root -p

That's all. Good luck!

Comments