lnmp一键安装包 的 mysql远程连接问题解决

因为lnmp一键安装包默认把3306端口禁止远程连接, 所以必须把端口限制解除

查看已有iptables规则, 用序号显示

iptables -L -n --line-numbers

删除对应的drop规则

iptables -D INPUT 6

如未设置远程登录账号可设置如下.远程登录:

---  grant all privileges on *.* to 创建的用户名@"%" identified by "密码";

--- 例:  grant all privileges on *.* to root@"%" identified by "root";

flush privileges;

然后就可以正常远程连接了...   

原文地址:https://www.cnblogs.com/teles/p/10247969.html