1. Open the folder where Mysql.exe and Mysqld.exe are located, copy the path address (this is the machine)D:\wamp\bin\mysql\mysql5.6.17\bin
2. Open the computer cmd command prompt and go to the folder where the previous step Mysql.exe is located (CD D:\wamp\bin\mysql\mysql5.6.17\bin)
3. Enter the command mysqld--skip-grant-tables enter and skip the MySQL user verification. Do not close the cmd window, and then open a new CMD command-line window. (Note: End the "mysqld.exe" process in Task Manager before entering this command to ensure that the MySQL server end is running.) )
4. In the new run cmd command line, go directly to the CD D:\wamp\bin\mysql\mysql5.6.17\bin folder below, then enter MySQL, do not need to take any login parameters directly enter the land database can be logged.
5. Enter show databases; You can see all the database instructions successfully logged in.
6. The MySQL library is where the user name is saved. Input use MySQL; Select MySQL database.
7.show Tables View all the tables, you will find a user table, which is stored in the username, password, permissions and so on account information.
8. Enter select User,host,password from user; To view account information.
9. Change the root password, enter update user set Password=password (' 123456 ') where user= ' root ' and host= ' localhost '; One of the 123456 passwords can be set on its own, see query ok,1 on behalf of the successful update of 1 lines, the password changes successfully
10. Close two command-line windows, restart MySQL, problem solving
MySQL database forgot login password How to retrieve and reset