1045 错误 (using password: YES)

作者:滴水穿石 | 创建时间: 2023-05-02
Navicat安装后出现错误:1045 - Access denied for user 'root'@'localhost' (using password: YES)...
1045 错误 (using password: YES)

操作方法

【问题所在】:未给root用户分配所有权限。 【解决步骤】:例如:用户名:aaa     密码:123456 一、打开 MySQL 5.5 Command Line Client 命令窗口: Enter password:123456

二、输入如下命令:grant all on *.* to aaa@ '%' identified by '123456';(记得在此语句后面加上英文的分号) mysql>grant all on *.* to aaa@ '%' identified by '123456';

三、接着会出现:Query OK,0 rows affected <0.00 sec>   说明已经更改权限成功,问题解决了。

四、打开Navicat,双击连接项,不会再报错误了,此时可以进行操作,为所欲为了。 【问题扩展】:grant all on *.* to aaa@ '%' identified by '123456';对于这句话,一语带过,就是授予 aaa 用户所有的权限。

点击展开全文

更多推荐