Navicat 连接虚拟机处理:
1、 关闭 linux 中 centos7 的防火墙
systemctl stop firewalld.service #停止 firewall
systemctl disable firewalld.service #禁止 firewall 开机启动
2、 首先确保 linux 服务上 mysql 的 3306 端口是对外开放的
[root@localhostTEST ~]# cd /etc/sysconfig/
[root@localhostTEST sysconfig]# iptables -A INPUT -p tcp -m tcp --dport 3306 -j ACCEPT
3、 然后登录 mysql,开启 root 权限(mysql 命令下执行)
赋予权限: grant all privileges on *.* to 'root'@'% 'identified by
'password' with grant option
3. 刷新权限列表:
mysql> flush privileges ;
记得结束加英文的 ;
4. 最后重启 mysql 服务
service mysqld restart
评论0
最新资源