Reference Address:
https://blog.csdn.net/vv19910825/article/details/82979563
1. Modify the configuration file mysql \ bin \ my.ini
Adding a line skip-grant-tables in text [mysqld] position, then restart mysql.
Such that the password verification can be skipped mysql
Direct command-line
# mysql
Enter mysql
Then you can operate the database and tables.
>use mysql;
> Update user set password = password ( "your new password") where user = "root";
>flush privileges;
>quit
You can then use the root account password.
Finally, just to get rid of the modified configuration file mysql \ bin \ my.ini part.