Monday 11 August 2008

How to reset MySQL password.

Follow the steps below:
  1. Stop the mysqld daemon process.
  2. Start the mysqld daemon process with the --skip-grant-tables option.
  3. Start the mysql client with the -u root option.
  4. Execute - UPDATE mysql.user SET password=PASSWORD('password123) WHERE user='root';
  5. Execute the FLUSH PRIVILEGES; command.
These steps reset the password for "root" account to "password123".

No comments: