Created
March 19, 2017 09:20
-
-
Save kimenye/fb028c38f169d87a8d3c3b92cee63ac3 to your computer and use it in GitHub Desktop.
Recovering your mysql root password
This file contains 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
sudo /etc/init.d/mysql stop | |
sudo mysqld_safe --skip-grant-tables & | |
mysql -u root | |
use mysql; | |
update user set password=PASSWORD("secure_password") where User='root'; | |
flush privileges; | |
quit | |
sudo /etc/init.d/mysql stop | |
sudo /etc/init.d/mysql start | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment