Skip to content

Instantly share code, notes, and snippets.

@kany
Last active December 11, 2015 20:58
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 kany/4658749 to your computer and use it in GitHub Desktop.
Save kany/4658749 to your computer and use it in GitHub Desktop.
Reset MySQL 'root' user password
This method only works if currently logged in as root. Sometimes when working with older ruby 'mysql' gems, after the 'mysql' gem is installed, the previous password doesn't work.
1) Already logged into Mysql
2) gem jacked up your mysql password
3) mysql > use mysql;
4) mysql > UPDATE user SET Password=PASSWORD('') WHERE User='root'; FLUSH PRIVILEGES;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment