What should I do if I forget my password on the mysql server under win7?

Source: Internet
Author: User

The details are as follows:

1. I forgot the password. How can I change the root password? Open the cmd window first;

2. Run dir to check the directory;

3. Switch cd mysql/bin to this directory;

4. Enter the current password to report an error;

5. mysqld -- defaults-file = "D: \ phpStudy \ MySQL \ my. ini" -- console -- skip-grant-tables run the command to bypass the authorization table;

6. Open another dos window and enter mysql to enter the mysql service;

7. The last step is show database; use mysql; update user set password = PASSWORD ('000000') where USER = 'root'; after the execution is complete, the password is successfully modified;

8. Log on again and try changing the password.

The above content is the method for modifying the root password in Windows 7. If you have the same requirements, you can try it again and I believe you will learn it soon. Hope to help you!

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.