Skip to content

Instantly share code, notes, and snippets.

@faboo03
Last active March 16, 2017 09:11
Show Gist options
  • Save faboo03/b8e7d89c581b77d49500a12688db211e to your computer and use it in GitHub Desktop.
Save faboo03/b8e7d89c581b77d49500a12688db211e to your computer and use it in GitHub Desktop.
Restart Mysql Root Password

Restart Mysql Password

sudo service mysql stop
sudo mysqld_safe --skip-grant-tables &

Restart password

mysql -u root -e 'update user set authentication_string="" where User="root"' mysql
mysql -u root -e 'update user set plugin="mysql_native_password" where User="root"' mysql
mysql -u root -e 'FLUSH PRIVILEGES' mysql

Restart services

sudo service mysql restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment