linux mysql远程连接

 

 mysql配置

//mysql用户授权
grant all privileges on *.* to 'root'@'%' identified by 'zf0106'; 
flush privileges;

 

 重启myql

 

阿里云等服务器安全组是否开启3306端口

 

查看linux防火墙是否开放3306端口

iptables -nL --line-number

修改防火墙配置文件

vim /etc/sysconfig/iptables  

重启防火墙

service iptables restart 

 

最后,测试本地连接

 

posted @ 2019-06-04 12:56  停不下来的小风车  阅读(331)  评论(0编辑  收藏  举报