mysql navicat 能连 程序不能连的情况
mysql_异常_01_Access denied for user 'root'@'192.168.1.13' (using password: YES)
一、异常现象
使用navicat premuim 连接 虚拟机mysql数据库时 ,抛出如下错误:
Access denied for user 'root'@'192.168.1.13' (using password: YES)

二、异常原因
Mysql 安装完毕后,
三、异常解决
在 mysql 服务器上使用root进行登录:
mysql -u root -p
然后执行如下命令:
(1) 创建用户并授权
|
1
2
3
4
5
6
|
# 创建 'root'@'%'用户CREATE USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'root';# 授权grant all on *.* to 'root'@'%';flush privileges; |
(2)或者修改密码
|
1
|
alter user 'root'@'%' identified by 'root.'; |
然后再连接即可成功连接。
浙公网安备 33010602011771号