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)