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).
Posts Tagged ‘mysql’
-
Forgotten MySQL Root Password
18 June 2010 by admin
Category Uncategorized | Tags: change,forgotten password,mysql,password,query,root,SQL | No Comments
-
Is MySQL OK?
by admin
There are always many ways to skin a cat but here’s a neat way to check on MySQL:
root@aleida:/home/aleida# mysqladmin -p ping
Enter password:
mysqld is aliveKinda neat, no?
Category Uncategorized | Tags: admin,commands,mysql,mysqladmin,ping | No Comments