If you forget the password of the root user, it is really a troublesome problem. Next we will teach you how to forget the MySQL root User in Windows for your reference.
Step 1: edit system variables. In this step, the MySQL installation Path D: \ MySQL Server 5.0 \ bin is stored in the system variable named Path, in this way, only the file name in the MySQL installation Path is typed under the DOC command, and the operating system searches for the file according to the Path in the Path system variable. If you are familiar with the DOC command, you can skip this step and directly enter the full path of the file under the DOC command. Here, I found that this is very similar to the reference namespace in C.
Step 2: Stop the MySQL service. First, check whether the MySQL Command is started. In the command line window, type net start. The command line displays the services that have been started in Windows. If the MySQL service has been started, use the net stop MySQL command to stop the service.
Step 3: run the following command mysqld-nt -- skip-grant-tables to start MySQL without checking the permissions.
Step 4: open a command prompt window and log on to MySQL: MySQL-u root with a blank password.
Step 5: Modify the password of the MySQL root User. Use this statement to set the new password to update mysql. user set password = password ('*******') where user = 'root' ******* is the new password ). Enter flush privileges, press enter, and then type quit to exit. This step involves the password I set, so there will be no textures)
Restart the computer to use the new password.
Troubleshooting of MySQL query timeout
How to Implement the query of the first few records in mysql
Use MySQL temporary tables to accelerate queries
How to properly use MySQL Indexes
Five common MySQL Log types