Home » Msyql » Recover MySQL root password

Recover MySQL root password

If you forgot your root mysql password this tutorial with help you to recover the root user passord

Stop the MySQL server process.

#service myql stop

Start again with no grant tables.

#mysqld_safe –skip-grant-tables &

Login to MySQL as root. Set new password.

# mysql -u root
mysql> use mysql;
mysql> update user set password=PASSWORD(“newrootpassword”) where User=’root’;
mysql> flush privileges;
mysql> quit

Exit MySQL and restart MySQL server.

About

I am founder and webmaster of www.linuxpcfix.com and working as a Sr. Linux Administrator (Expertise on Linux/Unix & Cloud Server) and have been in the industry from last 7 years.

Leave a Reply

Your email address will not be published. Required fields are marked *

*
*

Time limit is exhausted. Please reload the CAPTCHA.

Categorized Tag Cloud