Services Plans Sign Up How we work Affiliates Contact us

August 13, 2010

HOW TO RECOVER LOST MYSQL PASSWORD

Filed under: Miscellaneous — admin @ 6:08 am

Steps for recovering mysql password are given below:
Stop the mysql service.
#/etc/init.d/mysql stop
Once, the mysql service completely stopped, run the below.
#/usr/bin/mysqld_safe –skip-grant-tables –skip-networking &
You will be now able to login without password.

 

#mysql -uroot mysql
Issue the below in mysql command line.
mysql>UPDATE user SET password=PASSWORD(your new password) WHERE user=”root”; FLUSH PRIVILEGES;
mysql>exit
Stop mysql.
#/etc/init.d/mysql stop
Start MySQL again
#/etc/init.d/mysql start
That’s it! You will be now able to login with your new password.

AddThis Social Bookmark Button

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment

You must be logged in to post a comment.

Powered by WordPress