MySQL Reset root password method under Windows

Source: Internet
Author: User
Tags mysql in mysql flush privileges

1. First close the MySQL service net stop MySQL in the command line
2, in the command line into the MySQL installation directory bin directory, to do not check the permissions of the way to start;
Mysqld-nt--skip-grant-tables
The interface will stay there all the time, don't bother with it.


3, and then reopen a command Prompt window, in the command line into the MySQL installation directory under the Bin directory, using a blank password to log in to MySQL with the root user;
Mysql-u Root
Modify the root user's password;
Update Mysql.user set Password=password (' New password ') where user= ' root ';(end must enter a semicolon, or the statement will not be executed)
MySQL flush privileges;

MySQL quit and then

In the command line, go to the MySQL installation directory in the bin directory, press CTRL + ALT + DEL on the keyboard to open Task Manager and end the MYSQL-NT process


Turn the MySQL service off under restart


Then reopen the command line interface
Mysql-uroot-p
Enter your new password on the OK;

MySQL Reset root password method under Windows

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.