Problem: password forgot input error case, login prompt:error 1045 (28000): Access denied for user
Check the online solution there is a My.ini file to add skip-grant-tables This paragraph of the text of the scheme. My version of mysql-5.6.24 is free to install. Folder only My-default.ini files, if directly in the My-default.ini file under the [mysqld] add skip-grant-tables is not effective.
You can rename the My-default.ini directly to My.ini, then add skip-grant-tablesunder [mysqld] and restart the MySQL service.
At this time, the root user can log in and change the operation through the command line.
c:\users\administrator>mysql-u root-p
Enter Password:
Enter directly, no password required
Change the root password operation, replace the new password with the password you need to set
mysql> use MySQL;
Database changed
mysql> Update user Set Password=password (" New password ") where user= "root";
Query OK, 3 Rows Affected (0.00 sec)
Rows Matched:3 Changed:3 warnings:0
mysql> flush Privileges;
Query OK, 0 rows affected (0.01 sec)
Finally, the My.ini added skip-grant-tables line is deleted, the file name is changed back to My-default.ini, restart the MySQL service.
MySQL ERROR 1045 (28000): Access denied for user workaround My-default.ini