Skip to content

Instantly share code, notes, and snippets.

@debloper
Created May 2, 2015 12:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save debloper/f4cdd023fbb12430c09a to your computer and use it in GitHub Desktop.
Save debloper/f4cdd023fbb12430c09a to your computer and use it in GitHub Desktop.
Reset forgotten MySQL root password
service mysql stop
mysqld_safe --skip-grant-tables
mysql --user=root mysql
update user set password=PASSWORD('new-password') where user='root';
flush privileges;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment