Forget about the MySQL password in the Win7 flagship computer?

Source: Internet
Author: User
Tags ini mysql in mysql command line

1. First, we press the Win7 flagship computer keyboard Win+r shortcut to open the computer's running window, and then we directly in the Run window to enter services.msc and click Enter.

2. After entering the service window of the Win7 flagship computer, we find the "MySQL56" in the right window and select it to "stop" so that the MySQL Server service stops.

3. Next, we need to find the MySQL in the Win7 flagship computer installation location, after we find, we will see its folder has an INI format file, which is used to record MySQL configuration information file.

4. We directly open the Command Prompt window on the Win7 flagship computer, then open the Command Line window and enter the following command:

C:userswang>mysqld--defaults-file= "D:program filesmysqlmysql Server 5.6my-default.ini"--console-- Skip-grant-tables, after that, we open a different command line window, enter the command: Mysql-u root-p, return to enter the MySQL command line interface.

5. The final step, we can modify the Win7 flagship system database, the password will be updated.

The commands you need to use are:

Mysql->show database;

Mysql->use MySQL

Mysql->update user Set Password=password (' 12345 ') where user= ' root ';

The last line of the 12345 represents the new password we set, we can make the changes on their own.

Note : More wonderful tutorials Please pay attention to the triple computer tutorial section, triple Computer office group: 189034526 welcome you to join

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.