Skip to content

Instantly share code, notes, and snippets.

@gelanivishal
Last active June 13, 2017 16:32
Show Gist options
  • Save gelanivishal/214732f88b188fe4f9f0d9fa893e233e to your computer and use it in GitHub Desktop.
Save gelanivishal/214732f88b188fe4f9f0d9fa893e233e to your computer and use it in GitHub Desktop.
Reset MySQL user password
  • Turn off MySQL
  • Reset the root password through safe mode

sudo mysqld_safe --skip-grant-tables //Start up safe mode mysql -u root //Log into MySQL as root: use mysql; update user set password=PASSWORD("the new password you want to use") where User='root'; flush privileges; exit

- Start MySQL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment