Steps for how MySQL skips permissions

Source: Internet
Author: User
Tags mysql backup
This article gives you the content is about how MySQL skips permission to operate the steps, there is a certain reference value, the need for friends can refer to, I hope to help you.

Today in the project is encountered such a problem, my MySQL password forgot, so I can not link the database, Baidu on the internet a bit, very simple, make a note, in order to meet with me as the problem of children's shoes quickly solve the problem.

1. Kill the MySQL process (stop MySQL service)

Service MySQL Stop

2. Do not check permissions to start MySQL

Mysqld_safe--skip-grant-tables

3. Log in to MySQL

Mysql-uroot

4. Change the root user password

UPDATE user SET Password=password (' 123456 ') WHERE user= ' root ';

5. Refresh Permissions

Flush Privileges;quit

6. Restart MySQL

Service MySQL Restart

It's so simple.
Related recommendations:

How to write the conditional statements about SQL database information and additions and deletions? Example

MySQL Backup Restore library command method parsing (long text)

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.