Skip to content

Instantly share code, notes, and snippets.

@iolloyd
Created June 21, 2016 14:01
Show Gist options
  • Save iolloyd/f748b1f6e7dd5b3dadec0fe9ed355628 to your computer and use it in GitHub Desktop.
Save iolloyd/f748b1f6e7dd5b3dadec0fe9ed355628 to your computer and use it in GitHub Desktop.
How to reset mysql root password
sudo /usr/local/mysql/support-files/mysql.server stop

sudo mysqld_safe --skip-grant-tables

mysql -u root

UPDATE mysql.user SET Password=PASSWORD('password') WHERE User='root';

FLUSH PRIVILEGES;

sudo /usr/local/mysql/support-files/mysql.server start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment