Wednesday, November 02, 2011

MySQL :: MySQL 5.0 Reference Manual :: C.5.4.1 How to Reset the Root Password

MySQL :: MySQL 5.0 Reference Manual :: C.5.4.1 How to Reset the Root Password: "Create a text file containing the following statements. Replace the password with the password that you want to use.

UPDATE mysql.user SET Password=PASSWORD('MyNewPass') WHERE User='root';
FLUSH PRIVILEGES;
Write the UPDATE and FLUSH statements each on a single line. The UPDATE statement resets the password for all root accounts, and the FLUSH statement tells the server to reload the grant tables into memory so that it notices the password change."

'via Blog this'