Stop MySQL service under Windows:
1. Open the Windows command prompt:
2. Go to the bin location of MySQL installation
net stop MySQL
Similarly, open: net start MySQL (where MySQL is the service name)
If there is no system service
Then mysqladmin shutdown mysqladmin Start
Just opened directly in the service
Reset Password:
1. Open the cmd command prompt and go to the folder where the previous step Mysql.exe is located.
2. Enter the command mysqld--skip-grant-tables enter and skip the MySQL user verification. Note After you enter this command, the command line cannot be manipulated, and you can open a new command line again. Note: End the Mysqld.exe process in Task Manager before entering this command to ensure that the MySQL server end is running.
3. Then directly enter MySQL, do not need to bring any login parameters directly to enter the land database can be logged.
4. Enter show databases; You can see all the database instructions successfully logged in.
5. The MySQL library is where the user name is saved. Input use MySQL; Select MySQL database.
6. Show Tables View all the tables, you will find a user table, which is stored in the username, password, permissions and other account information.
7. Enter select User,host,password from user; To view account information.
8. Change the root password, enter update user set Password=password (' 123456 ') where user= ' root ' and host= ' localhost ';
9. Check the account information again, select User,host,password from user; You can see that the password has been modified.
10. Exit the command line, restart the MySQL database, and try to log in with the new password.
11. Test without password to log in to MySQL, found or able to log on, but the database can only see two databases, the restart after the Skip password verification has been canceled.
Reference Link: http://jingyan.baidu.com/article/454316ab4e9e65f7a7c03ad1.html
MySQL Reset password