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

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

 

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

iptables -L -n --line-numbers

996820-20190110090527452-1485854497479aceaef3d97ff9.png

删除对应的drop规则

iptables -D INPUT 6

 

 

 

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

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

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

flush privileges;

 

 

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

版权声明:
作者:John
链接:https://vps.la/2020/10/21/lnmp%e4%b8%80%e9%94%ae%e5%ae%89%e8%a3%85%e5%8c%85-%e7%9a%84-mysql%e8%bf%9c%e7%a8%8b%e8%bf%9e%e6%8e%a5%e9%97%ae%e9%a2%98%e8%a7%a3%e5%86%b3/
来源:VPS啦
文章版权归作者所有,未经允许请勿转载。

THE END
分享
二维码
< <上一篇
下一篇>>