Problem Description:
C:\users\bo.wang> Mysql-u Root-p
Enter Password:
ERROR 1045 (28000): Access denied for user ' root ' @ ' localhost ' (using Password:yes)
Steps to resolve:
Step1: Modify the MySQL configuration file my.int, add Skip-grant-tables and save.
Step2: Restart the MySQL service.
Step3: Change root password
C:\users\bo.wang>mysql
mysql> use MySQL
Database changed
mysql> Update user Set Password=password ("123456") where user= "root";
Query OK, 0 rows Affected (0.00 sec)
Rows matched:1 changed:0 warnings:0
mysql> flush Privileges;
Query OK, 0 rows Affected (0.00 sec)
Mysql> exit
Step4: Connect MySQL with Navicat or other visual tools to view the user table in MySQL library, modify the root user's permissions (password is encrypted, do not change)
STEP5: Re-modify My.ini, Comment skip-grant-tables command line, save restart MySQL service
Access Denied for user root @localhost solution