Created
May 15, 2018 15:22
-
-
Save alexander-arce/300b2ae693c85a0c223cd67a45cdc629 to your computer and use it in GitHub Desktop.
Mysql Reset 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
systemctl stop mysql.service | |
/usr/bin/mysql_safe --skip-grant-tables | |
mysql -u root | |
use mysql; | |
update user set authentication_string=PASSWORD("**NEW-PASSWORD**") where User='root'; | |
flush privileges; | |
quit; | |
systemctl start mysql.service | |
# Test new Password | |
mysql -u root -h localhost -p | |
:) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment