MySql error 1045 Access denied for user 'root' @ 'localhost' (using password: YES) solution for windows (forgot password ),
1. log on to the Administrator console to stop the mysql service: net stop mysql;
2. Go to the mysql installation path. For example, if my installation path is C: \ Program Files \ MySQL Server 5.5, open my. INI file, find [mysqld], add skip_grant_tables under this line, that is, to notify mysql, skip password verification during login, save and exit;
3. Restart the mysql service: net start mysql;
4. On the console, enter mysql-u root-p and enter the password. Press enter to enter mysql;
5. Reset the user root Password and enter: update user set password = Password ('your new password') where user = 'root ';
6. Exit musql and enter quit;
7. stop the mysql Service. On the Administrator console, enter: net stop mysql;
Delete the added skip_grant_tables line in the C: \ Program Files \ MySQL Server 5.5 \ my. ini file;
After saving, restart the mysql service and enter: net start mysql;
8. Log On with the new password.