"MySQL forgot password" mysql forgot password how to solve mysql5.5 windows7

Source: Internet
Author: User

---restore content starts---

If MySQL is not used for a long time, forget the password, how to solve???

1. First, you need to close the MySQL-related service process in Task Manager

2.cmd, enter the DOS window and go to the bin directory of the MySQL installation path

3. Enter the command in the bin directory: Mysqld--skip-grant-tables

4. Do not close the DOS window above, open a new DOS window, also go to the bin directory

5. This in the bin directory, type: Mysql-u root-p Enter, pop-up Enter password, and then do not enter any password, direct enter, you can go to the MySQL interactive page

6. Under the MySQL interactive page, enter the UPDATE statement to set a new password for the root account, as follows:

Update Mysql.user Set Password=password ("root") where host= "localhost" and user= "root";

Note that this is where the root account password is set to root. And, the UPDATE statement needs; end.

After the carriage return, it shows that changed 11 changes were successful.

7. You can open a DOS window of a heart, verify it, or start it directly with SQLyog to verify the success.

OVER!!!

---restore content ends---

"MySQL forgot password" mysql forgot password how to solve mysql5.5 windows7

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.