Log in to the MySQL database using the root user error 1045 (28000): Access denied for user ' root ' @ ' localhost ' (using Password:yes).
Solution:
1. Execute command : Service mysqld stop; stop MySQL service
2. Add parameter start execution command mysqld_safe--skip-grant-tables (note: Will be stuck on the current terminal after execution)
3. Open a terminal mysql-u root; You can log in to the database.
4. Execute command : use MySQL; switch Database
5. Execute the command: Update user Set Password=password ("123456") where user= "root"; Change root password
6.flush privileges; Configuration parameters take effect
7. Exit the database; exit;
8.service mysqld start; Launch database.
This article is from the "three-pole Walker" blog, please be sure to keep this source http://namesam.blog.51cto.com/12364721/1976345
Workaround for MySQL database report access denied for user