First of all we need to stop mysql
/etc/init.d/mysql stop
Create a mysql table dump to reset the password
UPDATE mysql.user SET Password=PASSWORD('YOUR-NEW-MYSQL-PASSWORD') WHERE User='root';
FLUSH PRIVILEGES;
Now we need to start mysql in safe mode and import the mysql table dump
mysqld_safe --init-file=/path/to/mysql/table/dump &
Finally we need to kill mysql and start it in normal mode
killall mysqld
/etc/init.d/mysql start
Your password should now [...]


13. August 2009
0 Comments