Skip to content

Instantly share code, notes, and snippets.

@ryanjbonnell
Created August 5, 2014 05:55
Show Gist options
  • Save ryanjbonnell/8ee0d9ef64e38bb7f465 to your computer and use it in GitHub Desktop.
Save ryanjbonnell/8ee0d9ef64e38bb7f465 to your computer and use it in GitHub Desktop.
MySQL - Reset Root Password
$ sudo /usr/local/mysql/support-files/mysql.server stop
$ sudo /usr/local/mysql/bin/mysqld_safe --skip-grant-tables --skip-networking &
mysql> UPDATE mysql.user SET Password=PASSWORD('') WHERE User='root';
mysql> FLUSH PRIVILEGES;
mysql> exit
$ mysql -h localhost -u root
mysql> set password=password('');
mysql> exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment