Forgot MySQL root password

Source: Internet
Author: User

1. cmd into console stop MySQL service

Command line: net stop MySQL

2. Switch to the MySQL installation under the bin directory, for example:

Command line: CD G:\MySQL\MySQL Server 5.6\bin

3, Execute Skip permission table limit parameters, after execution completes the command window does not close, re-cmd open another console window (May pop a warning, ignore)

Command line: mysqld--skip-grant-tables

4, in the new window to switch to the bin directory, the operation of the same step "2"

5. Execute command line: mysql-u root

6, enter after the execution command line: Update mysql.user set Password=password ("ABCD") where user= "root";

7. Refresh Permissions

Command line: Flush privileges;

8. Exit

Command line: \q

Complete, log in again.

Forgot MySQL root 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.