Rss Feed

Forgotten MySQL Root Password

18 June 2010 by admin

It happens to the best of us all the time. (Three times in a 24-hour period is my record…) On my Ubuntu VPSs, this is what I do when that happens:

$-> /etc/init.d/mysql stop
$-> mysqld_safe --skip-grant-tables &
$-> mysql -u root

Use the ‘msyql’ database to issue this query:
UPDATE user set password=PASSWORD("ice_cream") where User='root';
Flush privs and then stop and start MySQL (normally).


No Comments »

No comments yet.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>