mysql - ubuntu开启3306端口失败,有什么办法可以解决?
本文介绍了mysql - ubuntu开启3306端口失败,有什么办法可以解决?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
问 题
通过以下命令查询,3306端口,竟然返回空的,3306端口没有开启
netstat -an|grep 3306
然后就使用以下命令
iptables -I INPUT 4 -p tcp -m state --state NEW -m tcp --dport 3306 -j ACCEPT
来开启3306,但是显示以下错误
iptables: Index of insertion too big.
是什么原因呢?
还有什么方法可以开启3306的端口吗?
需要做远程链接
解决方案
iptables -I INPUT 4 -p tcp -m state --state NEW -m tcp --dport 3306 -j ACCEPT
表示在INPUT chain中第四行的位置插入这条rule
iptables: Index of insertion too big.
说明你的iptable里没有那么多行
iptables -S
看一下你一共多少行
man iptables
先捋一遍再操作,不然很容易一条指令直接断网
这篇关于mysql - ubuntu开启3306端口失败,有什么办法可以解决?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文