Public Domain
UPDATE mysql.user SET Password=PASSWORD('MyNewPass') WHERE User='root';
FLUSH PRIVILEGES;
chown mysql:mysql /var/lib/mysql/mysql-pass-recover
/etc/rc.d/rc.mysqld stop
sleep 5
killall mysqld; killall mysqld; killall mysqld; killall mysqld;
sleep 5
mysqld_safe --init-file=/var/lib/mysql/mysql-pass-recover &
sleep 5
killall mysqld; killall mysqld; killall mysqld; killall mysqld;
sleep 5
/etc/rc.d/rc.mysqld start
BY: Pejman Moghadam
TAG: mysql, password-recovery
DATE: 2014-01-18 18:00:40