Simple way to recover root password for MYSQL

  1. Stop mysql service
  2. In “c:\Program Files\MySQL\MySQL Server 5.1\my.ini”, add skip-grant-tables in [mysqld]
  3. Start mysql service
  4. Run mysql commandline utility
  5. Type
    • UPDATE mysql.user SET Password=PASSWORD(‘MyNewPass’) WHERE User=’root’;
    • FLUSH PRIVILEGES;
  6. Stop mysql service
  7. Remove skip-grant-table in my.ini
  8. Start mysql service

Full Version from MySQL (slightly different)
http://dev.mysql.com/doc/refman/5.0/en/resetting-permissions.html 

Categories: Database