In Windows, how does Mysql reset the root user password? _ MySQL

Source: Internet
Author: User
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

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.