mysql installation problem The security setting could not be applied to the database solution

2011-01-12  来源:本站原创  分类:Database  人气:113 



I believe a friend of mine encountered this problem, especially not the first time installing mysql friends.
Note: I said are in the mysql system windowsXP problem problem description is generally "The security setting could not be applied to the database because the connection has
failed with the following error "

Online approach is generally
1, the original mysql uninstall, then manually remove the installation directory
2, in the registry query mysql, delete the registry information
3, 3306 (mysql port) release in the firewall for more than two steps, if they can solve problems better, you can try.

My system is win7, did not succeed, I am using the following method to solve


However, my problem is the adoption of the following solution.
Important: If you can not start the mysql service is always, in the time of installation, another name for the mysql service, such as mysql501
1 If your mysql instance configuration wizard fails, cancel the wizard, go to the windows system services interface (entry by running services.msc, and then Enter to enter the service interface), to stop the mysql service
2 instances of mysql wizard is executed again (this time mysql service should be started)
- Can start -> mysql -> Configuration Wizard to open an instance of an instance configuration wizard
3 If Step 4 fails (Apply Security Settings), cancel the wizard
4 Create a txt file (eg C: \ mysqlpassword.txt)), file contents are as follows:
UPDATE mysql.user SET Password = PASSWORD ('mypassword') WHERE User = 'root';
5 Open a command window and execute the following command "C: \ Program Files \ MySQL \ MySQL Server 5.1 \ bin \ mysqld"-defaults-file = "C: \ Program Files \ MySQL \ MySQL Server 5.1 \ my.ini" - init-file = C: \ mysqlpassword.txt-standalone-console
After the implementation, not to keep the window closed
6 Open another command window, execute the following command "C: \ Program Files \ MySQL \ MySQL Server 5.1 \ bin \ mysqladmin"-u root-p shutdown
(Enter the password specified in mysqlpassword.txt)
7, execute the mysql instance configuration wizard, Apply Security Settings should be able to succeed Good luck!
This approach is found from

Although the step 6 when the error, but does not affect, you can directly proceed to step 7 error

C:\Program Files\MySQL\MySQL Server 5.5\bin\mysqladmin: connect to server at 'lo
calhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: YES)'