How does one forget the MySQL root User Password?

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.