~$ sudo apt-get


Reset mySQL root password

by on Jan.12, 2010, under mySQL

First, insert the init-file directive into the mySQL configuration under the [mysqld] section.


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.

Leave a Comment more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...