歡迎您光臨本站 註冊首頁

mysql資料庫同步, 防火牆問題

←手機掃碼閱讀     火星人 @ 2014-03-03 , reply:0

mysql資料庫同步, 防火牆問題

系統Centos6.2
mysql主從已經配置成功,關閉防火牆的時候, 同步成功

打開防火牆,並加入
#iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 3306 -j ACCEPT
#service iptables save
#service iptables restart


還是不能同步, 我哪裡做的不對呀? 請指教
《解決方案》

回復 1# biyexp


-A ..
-I 放在第一層
-A放在最後一層
或者-I INPUT n

iptables -L 看看
《解決方案》

Chain INPUT (policy ACCEPT)
target     prot opt source               destination         
ACCEPT     udp  --  anywhere             anywhere            udp dpt:domain
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:domain
ACCEPT     udp  --  anywhere             anywhere            udp dpt:bootps
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:bootps
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:mysql
ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED
ACCEPT     icmp --  anywhere             anywhere            
ACCEPT     all  --  anywhere             anywhere            
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:ssh
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:http
REJECT     all  --  anywhere             anywhere            reject-with icmp-host-prohibited

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         
ACCEPT     all  --  anywhere             192.168.122.0/24    state RELATED,ESTABLISHED
ACCEPT     all  --  192.168.122.0/24     anywhere            
ACCEPT     all  --  anywhere             anywhere            
REJECT     all  --  anywhere             anywhere            reject-with icmp-port-unreachable
REJECT     all  --  anywhere             anywhere            reject-with icmp-port-unreachable
REJECT     all  --  anywhere             anywhere            reject-with icmp-host-prohibited

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

[火星人 ] mysql資料庫同步, 防火牆問題已經有445次圍觀

http://coctec.com/docs/service/show-post-633.html