The problem with access denied for user ' root ' @localhost ' (using Password:no) will appear when we install MySQL under Windows, because you have previously installed MySQL on your machine, or this Once the installation is configured with a new password, the last step of entering the app is stuck for some reason or cannot be configured successfully due to a service not being started, and the end result is that the configuration was unsuccessful and the password settings were saved. After we have adjusted the service and other reasons, when reconfiguring, we will find that when the password is set, there is an old password input box. In fact, this is nothing, in the case of password know, enter the old password re-set password is not difficult, and the problem is that even if the old password is correct, you still can not complete the configuration, in the last Link password authentication error, error reason is the password problem, the old password is incorrect.
Workaround:
1. Management tool---Service inside stop MySQL service.
2. Control Panel---Uninstall MySQL, delete C:\Program files\mysql directory.
3. this is the most critical step, only to do the first two steps, the password or can not be modified, because MySQL also has files, that is, in C:\Documents and Settings\All Users\Application Data inside the MySQL folder, This file is not cleared and is the source of the old password for MySQL reload. Then delete the MySQL folder.
4. Check if there is a My.ini file in the C:\WINDOWS directory and delete it
5. Heky_local_machine,software,mysql deletion in the registration table
Hkey_local_machine\system\controlset001\services\eventlog\application\mysql Directory Removal
Hkey_local_machine\system\controlset002\services\eventlog\application\mysql Directory Removal
Hkey_local_machine\system\currentcontrolset\services\eventlog\application\mysql Directory Removal
The firewall can be broken off.
The wound file must be clean!
Mysql Installation Error nr.1045