mySQL
Reset mySQL root password
by sudo on Jan.12, 2010, under mySQL
First, insert the init-file directive into the mySQL configuration under the [mysqld] section.
init-file=/var/lib/mysql/mysql-init
Create /var/lib/mysql/mysql-init with the following line. Replace ‘Changeme’ with a password of your choosing.
SET PASSWORD FOR ‘root’@’localhost’=password(‘Changeme’);
Restart the mySQL service and login as root with the password used above. Remember to remove the init-file directive and the init file you created once complete.