Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save dreambold/a9d0140441d06d89625a429def3eb080 to your computer and use it in GitHub Desktop.
Save dreambold/a9d0140441d06d89625a429def3eb080 to your computer and use it in GitHub Desktop.
Reset MySQL 8.0 root Password in Windows

Reset MySQL 8.0 root Password in Windows

  1. Stop the MySQL 8.0service from services
  2. Go to path C:\Program Files\MySQL\MySQL Server 8.0\bin and open cmd
  3. Run mysqld --console --skip-grant-tables --shared-memory
  4. Open new cmd in the same path
  5. Run following commands
  6. mysql -u root
  7. select authentication_string,host from mysql.user where user='root';
  8. UPDATE mysql.user SET authentication_string='' WHERE user='root';
  9. Now close both the cmd.
  10. Try to start the MySQL 8.0 service.
  11. Connect using username as root & password as blank.
  12. Change the password from the user managerment.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment