通过Navicat for MySQL连接到虚拟机中的MySQL,但是报了图的错误
要进行两步:
1)授权
授权
mysql>grant all privileges on *.* to 'root'@'%' identified by 'youpassword' with grant option;
mysql>
grant
all
privileges
on
*.*
to
'root'
@
'%'
identified
by
'youpassword'
with
option
;
mysql>flush privileges;
mysql>flush
2)查看防火墙是否添加了3306的端口
(我直接关闭了防火墙)