Mysql forgot database Password

Source: Internet
Author: User
How to modify the MySQL password under Windows 1. Close the running MySQL service:

A. Run the net stop MySQL under the command

B. Find the MySQL service stop MySQL service

C. Ending the MySQL process in Task Manager

2. Open the command line and go to the MySQL bin directory

C:\USERS\ADMINISTRATOR>CD C:\Program files\mysql\mysql Server 5.5\bin

3. Skip Login Verification

Input: Mysqld-nt--skip-grant-tables, then enter, if there is no error message, on the line;
Note: After the skip-grant-tables parameter is used, the login check can be skipped;

4. Other operations

Open a command line again (because the DOS window is no longer moving), also go to the MySQL bin directory;

MySQL and enter, if successful, a MySQL prompt will appear >

5. Switch to the MySQL user table

Execute: Use MySQL;

Change Password: UPDATE user SET Password=password ("123456") WHERE user= "root";

6. Refresh Permissions

FLUSH privileges;

End!

Mysql forgot database Password

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.