Skip to content

Instantly share code, notes, and snippets.

@pandauxstudio
Last active March 17, 2017 23:00
Show Gist options
  • Save pandauxstudio/ac12558aae548be8acba4c9c7fbc5525 to your computer and use it in GitHub Desktop.
Save pandauxstudio/ac12558aae548be8acba4c9c7fbc5525 to your computer and use it in GitHub Desktop.
MySQL Password Reset
Exec mysql client as root
$ mysqld -u mysql --skip-grant-tables &
Update your password
$ mysql -u root
Reload privileges
mysql> update mysql.user set password=password('newpassword') where user='root';
Kill mysqld
mysql> flush privileges;
Start mysql daemon
$ killall mysql
$/etc/init.d/mysql start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment