I first introduce the environment I use:
1. Windows;
2. php Service Manager wamp5;
Let's talk about the following:
1. Open the task manager and end the process mysqld-nt.exe
2. Run Command window
1). Run the "bin" directory in the PHP Service Manager installation directory (my directory is "D: \ Wamp \ mysql \ bin ),
Operation:
(1) Enter disk D, for example, D: Press enter;
(2) enter the bin directory, for example, CD Wamp \ mysql \ bin. Press enter;
(3) skip the permission check to start MySQLFor example, mysqld-NT -- skip-grant-tables; press ENTER
(4) At this time, the cursor can only Flash and cannot be operated, that is, it is a huge step of success;
For example:
2) open another command window:
Operation:
(1) run the following command in the bin directory of the PHP Service Manager installation directory:
Enter disk D, for example, D: Press enter;
Enter the bin directory, for example, CD Wamp \ mysql \ bin. Press enter;
(2) enter the use data table and enter the command, for example, use MySQL press Enter;
(3) start to set the password, for example, update user SET Password = PASSWORD ("123456") where user = "root"; press ENTER
(4) perform the so-called refresh such as flush privileges; press ENTER
(5) Exit, such as: exit; press enter OK;
Note: (6), when the database has not started, with tricks (open the task manager, stop the process mysqld-nt.exe and then restart; absolutely OK !)
For example: