MySQL password forgot the workaround

Source: Internet
Author: User
Tags mysql in

MySQL in Windows State:

Steps:

Prepare the data:

If you have saved the MySQL address to an environment variable, you will not need to enter the MySQL path in the DOS command window every time.

If this is not done, then each time you enter the DOS command window.

The path where MySQL is located is as follows:

If you forget the path to MySQL, then you can enter the following command: WIN+R---->cmd--->services.msc appears as follows, and finds out:

Right click on MySQL, properties, the following page appears:

The specific implementation steps are as follows:

On the basis above: input: Mysqld-nt--skip-grant-tables

The Mysqld.exe process is closed and a new command window is opened:

Input: MySQL

See the page above, it means that you have successfully entered the MySQL.

Next: Show databases; query all databases.

Next: Use MySQL------->show tables

Next: If you are unfamiliar with the fields in the user table, you can go to the table to see

Use user;

Select User,host,password from user;

Finally, you can change the password based on the corresponding field.

Update user Set password = ' password you want to set ' from user;

Finally, open mysql,net start MySQL, you can log in according to the username and password you set.

MySQL password forgot the workaround

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.