1. First exit the mysqld.exe process
2. Enter the /bin path of mysql installation Road King
3. The cmd command input mysqld --skip-grant-tables, it will be stuck at this time, reopen a command line
4. Enter mysql directly, use mysql, enter the mysql database, and then enter update user set password=password('123456') where user='root' and host='localhost';, sometimes the password will be replaced by
authentication_string
field, you can replace it.
5. Cut out cmd, restart the mysql service, and end the mysqld process first.
Successfully modified