Friday, January 31, 2014

Recover MySQL root Password Linux

Step 1 : 

#/etc/init.d/mysql stop

Step 2 : 

#mysqld_safe --skip-grant-tables &

Step 3 :

#mysql -u root

Step 4 :

mysql>use mysql;
mysql>update user set password=PASSWORD("NEW-ROOT-PASSWORD") where User='root';
mysql>flush privileges;
mysql>quit

Step 5 :

#/etc/init.d/mysql stop

Step 6 :

#/etc/init.d/mysql start

Step 7 :

#myql -u root -p

No comments:

Post a Comment