Reset mysql root password when lost
Written on 3:44 PM by David S Anand
How to Reset Mysql root password without old password ..
Follow the steps .........
1) Log in to the server as root
2) Stop the MySql server by typing:
/etc/rc.d/init.d/mysqld stop
3) Restart safe_mysqld with the skip-grant-tables option by typing:
/usr/bin/safe_mysqld -Sg &
4) Start MySql as root by typing:
mysql -u root -p mysql (When prompted for a password, just hit enter)
5) Set a new password for root by typing:
update user set password=password("new_pass") where user='root'; (Replace new_pass with you new desired password)
flush privileges;
quit
/etc/rc.d/init.d/mysqld restart
