Friday, March 22, 2013

how to recover mysql root password


Follow three easy steps  to recover mysql root password.
irst of all stop mysqld service

#service mysqld stop or /etc/init.d/mysqld stop

start with skip grant table option

#mysqld_safe --skip-grant-tables &

now login with root without any password

# mysql -u root

here you got it!
now for own safety change mysql root password

mysql> set password=PASSWORD('yourpasswd');
mysql> flush privileges;

now stop mysql service and start it again 

No comments:

Post a Comment