Navicat 连不上首先需要看具体报错,
- 如果报错如下
Host '*' is not allowed to connect to this MariaDB server
解决方案如下:
grant all privileges on*.* to'root' @'%' identified by 'root' with grant option;
flush privileges;
- 如果执行第一步还连接不上,报错如下:
Can't connect to MySQL server on 'x.x.x.x'(10038)
检测一下防火墙是否关闭,
本人是centos 7.6
systemctl status firewalld # 查看防火墙状态
如果 Active: active (running)
systemctl stop firewalld # 临时关闭防火墙
systemctl disable firewalld #永久关闭,即设置开机的时候不自动启动
网友评论