Reset Mysql Password

Created from http://www.debian-administration.org/articles/442

akonkol
February 16, 2012

/etc/init.d/mysql stop

/usr/bin/mysqld_safe --skip-grant-tables &

mysql --user=root mysql

update user set Password=PASSWORD('%{new_root_password}%') WHERE User='root';

flush privileges;

exit

pkill -9 mysqld_safe

/etc/init.d/mysqld start