Access denied for user ' root ' @ ' localhost ' (using password:yes) solution
Solution:
1. Open the My.ini file in MySQL directory, add a line "Skip-grant-tables" at the end of the file, save and close the file.
2. Restart the MySQL service.
3, enter "Mysql-uroot-p" in the command line (do not enter a password), enter the database.
4, execute, "use MySQL;" Use the MySQL database.
5. Execute, "Update user set Password=password (" Rootadmin ") where user= ' root '; (Change the root password)
(During the period I also select the record in the user table, query all the time shows some garbled, and then I only query the user table in the host, user, password field, it seems to show 3 records, there are 1 No name.) Of course, in order to solve the problem, I can not control it. )
6. Open the My.ini file in MySQL directory, delete the last line "Skip-grant-tables", save and close the file.
7. Restart the MySQL service.
8, enter "Mysql-uroot-prootadmin" in the command line, the problem is done!
Actually, I just used the first to second one, and it worked.
Access denied for user ' root ' @ ' localhost '