Skip to content

Instantly share code, notes, and snippets.

@alexander-arce
Created May 15, 2018 15:22
Show Gist options
  • Save alexander-arce/300b2ae693c85a0c223cd67a45cdc629 to your computer and use it in GitHub Desktop.
Save alexander-arce/300b2ae693c85a0c223cd67a45cdc629 to your computer and use it in GitHub Desktop.
Mysql Reset Root Password
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