MySQL is a very common open source database, many users, if you accidentally forgot to install the server's MySQL password, unable to log in, how should I reset it? The method is very simple, now share with you. (System environment: CentOs 6.5 software: Mysql)
1. First confirm that the server is in a secure state, that is, no one can connect to the MySQL database arbitrarily. Because the MySQL database is completely out of password-protected state during the reset of the root password of MySQL.
2. Modify the MySQL login settings:
3. Log in and modify the root password of MySQL
New-password is the new password, the password in the image is reset to "123456"
4. The modification succeeds, but do not forget to delete the new content of the configuration file, then restart MySQL, log in with the new password
VI command to remove the second step to add the content, not detailed said
Re-use password mode login
Mysql (Linux server) root user password forgot reset method