You can use this method to retrieve the lost MySQL super administrator root password.
1, Stop MySQL service, CMD open DOS window, enter net stop MySQL
2In the CMD command line window, enter the MySQL installation directory, such as D:/mysql5.1/bin.
3To enter the MySQL security mode, that is, when MySQL is up, it can enter the database without entering the password.
Command: mysqld -- skip-grant-tables
***************************************
4. Open a new cmd command line window, enter mysql-uroot-P in the bin directory of the MySQL installation directory, and log on to MySQL with a blank password (no password is required, press enter directly)
5. Enter the following command to modify the password of the root user (Note: There is a "point" in the middle of MySQL. User ")
Mysql> Update mysql. User SET Password = PASSWORD ('new password') where user = 'root ';
6. Refresh the permission table
Mysql> flush privileges;
7. Exit
Mysql> quit
So MySQL super Administrator account root has been reset, then in the task manager to end the mysql-nt.exe this process, restart MySQL! (You can also restart the server)
After MySQL is restarted, you can log on to MySQL with the newly set root password!