- Locate the MySQL configuration file My.ini
- Add Skip-grant-tables under [mysqld]
- Win+r shortcut key Input cmd then enter the command net stop MySQL finally make the directory point to the bin directory in the MySQL installation directory
- Input command mysqld-nt--skip-grant-tables (local test hint a waring doesn't seem to affect)
- Win+r the shortcut key again enter CMD and enter the command mysql-u root return, this time should enter MySQL
- Select Database user mysql;
- Change Password: Update user set Password=password ("New password") where user= ' root '; Note The uppercase password is encrypted with the new password three words replaced with their own password
- Kill the MYSQLD-NT process in Task Manager
- Delete the content added in the second item
- Restart MySQL
- Enter new password detection.
Forgot to modify MySQL password under Windows