In Windows, how does Mysql reset the root user password bitsCN.com?
Link: http://www.feeldesignstudio.com/2013/05/windows-mysql-root-password-reset
Many methods of resetting the root user password on the Internet in Windows are invalid. here, an effective method is provided:
Step 1: Stop the MySQL service:
You can stop the MySQL service by accessing the service window (administrative tool -- service, or running -- services. msc.
Step 2: Go to the MySQL bin directory:
Open the MS-DOS command line window (run -- cmd) and enter the command: cd C:/MySQL/bin (here is the directory where MySQL is installed ).
Step 3: enter the command to skip the authorization table:
Enter the command: mysqld.exe-u root-skip-grant-tables
Step 4: open a new MS-DOS command line window and enter the MySQL bin directory:
The operation is the same as that in step 2. do not close the previous command line window.
Step 5: execute the following command:
Enter mysql and press enter;
You should enter the MySQL command line, enter use mysql; press enter;
Enter UPDATE user SET Password = PASSWORD ('New _ password') WHERE User = 'root'; press enter (replace NEW_PASSWORD with the new password you want to change );
Enter exit and press Enter. you should have exited the MySQL command line.
Step 6: Start the MySQL service:
Close all MS-DOS command line windows, locate the MySQL service and start according to the first step, and end the mysqld process in task manager if half-day no response is started.
The above six steps are complete.
BitsCN.com