« The Moon | Home | 周末 »

May 25, 2007

How to Reset a MySQL Password in 5 Easy Steps


Stop the mysqld daemon process.
Start the mysqld daemon process with the --skip-grant-tables option.
Start the mysql client with the -u root option.
Execute the UPDATE mysql.user SET Password=PASSWORD('password') WHERE User='root';
Execute the FLUSH PRIVILEGES; command.
These steps reset the password for the "root" account to "password". To change the password for a different account, or to set a different password, just edit the variables in single-quotes in step 4.

If you know your existing MySQL root password, steps 1-3 are not necessary.

Posted by Dr. Evil on May 25, 2007 9:44 AM |

评论

添加评论







固定链接与引用