Created
May 28, 2016 04:50
-
-
Save chrissuperduper/4bc7b907840a7ba7fb0ee1bb4ad88f44 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
How to reset the root password for mysql: | |
Stop mysql: | |
1. service mysql stop | |
Run mysql with skip grants to be able to login without any password | |
2. mysqld_safe --skip-grant-tables & | |
Login as root | |
3. mysql -u root | |
4. mysql commands: | |
mysql> use mysql; | |
mysql> update user set password=PASSWORD("NEW-ROOT-PASSWORD-HERE") where User='root'; | |
mysql> flush privileges; | |
mysql> quit | |
Stop mysql | |
5. service mysql stop | |
Start mysql normally: | |
6. service mysql start | |
Try to login using your new password: | |
7. mysql -u root -p |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment