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).
Forgotten MySQL Root Password
18 June 2010 by admin
Category Uncategorized | Tags: change,forgotten password,mysql,password,query,root,SQL
No Comments »
No comments yet.