When MySQL is installed in windows, the following error occurs: Access denied for user 'root' @ localhost' (using password: no, this problem is because you have installed MySQL on your machine, orAfter the new password is installed and configured this time, the configuration fails due to some reasons such as the problem that the application is stuck or the service is not started. The final result is that the configuration is not successful, the password settings are saved. In this way, after adjusting the service and other reasons, when re-configuring, we will find that an old password input box is added when setting the password. In fact, this is nothing. It is not difficult to enter the old password and reset the password when you know the password. The key is that even if the old password is correct, you still cannot complete the configuration, in the last step, I encountered another error during password authentication. The cause of the error was the password problem, prompting that the old password was incorrect.
Solution:
1. Management Tools --- stop the MySQL service in the service.
2. Control Panel --- uninstall MySQL and delete c: \ Program
Files \ mysql directory.
3.This is the most critical step. The password cannot be modified only in the previous two steps, because MySQL still has files, that is, in c: \ Documents and
Settings \ All Users \ Application
The MySQL folder in data. The file is not cleared, which is the root cause of the old password in MySQL reinstallation. Delete the MySQL folder.
4.Check whether the my. ini file exists in the C: \ Windows directory and delete it.
5. Delete heky_local_machine, software, and MySQL in the registry.
HKEY_LOCAL_MACHINE \ SYSTEM \ controlset001 \ Services \ Eventlog \ Application \ mysql
Directory Deletion
HKEY_LOCAL_MACHINE \ SYSTEM \ controlset002 \ Services \ Eventlog \ Application \ mysql
Directory Deletion
HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services \ Eventlog \ Application \ mysql
Directory Deletion
After completing the preceding steps, you can reinstall MySQL and perform new configuration.