错误如图所示:
![](https://i-blog.csdnimg.cn/blog_migrate/4091b5131c37f4699342f3fdc4bdd819.png)
![](https://i-blog.csdnimg.cn/blog_migrate/c57a4b16e1bf77a18908decec2c01139.png)
解析错误:ERROR 1045 (28000): Access denied for user ‘root’@‘localhost’ (using password: YES);:
①Access denied(拒绝访问);
②using password:NO/YES
解决方案:
(1)到安装的MySQL的目录(例如:D:\mysql5\mysql-5.7.31-winx64)下,找my.ini文件;
(2)在[mysqld]后添加skip-grant-tables(使用 set password for设置密码无效,且此后登录无需键入密码)
skip-grant-tables #在my.ini,[mysqld]下添加一行,使其登录时跳过权限检查
(3)重启MySQL服务器。
重启方