Skip to content

Instantly share code, notes, and snippets.

@nunenuh
Created November 26, 2017 13:03
Show Gist options
  • Save nunenuh/878ca6286b2edd005c16f6105c441902 to your computer and use it in GitHub Desktop.
Save nunenuh/878ca6286b2edd005c16f6105c441902 to your computer and use it in GitHub Desktop.
How To Repair Lost Password MySQL
service mysql stop
mysqld_safe --skip-grant-tables &
mysql -u root
mysql>use mysql;
mysql>update user set password=PASSWORD("a") where User='root';
mysql>flush privileges;
mysql>quit;
service mysql stop
service mysql start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment