Tentando conectar-se ao host remoto do MySQL (erro 2003)
Tenho uma instância do MySQL em execução em um servidor Debian e consigo conectar-me localmente sem problemas. No entanto, não consigo me conectar a ele remotamente. Quando tento isso na minha linha de comando, recebo o seguinte erro:
ERROR 2003 (HY000): Can't connect to MySQL server on '<server-ip>' (110)
Adicionei o usuário ao mysql como 'user' @ '*' e 'user' @ 'localhost'. skip-networking neste servidor está definido como false e o endereço de ligação é comentado em my.cnf. Também tentei abrir a porta 3306 no iptables usando o seguinte comando:
/sbin/iptables -A INPUT -i eth0 -p tcp --destination-port 3306 -j ACCEPT
Aqui está uma lista de todas as minhas regras de firewall iptable, que recuperei usando iptables -L:
Chain INPUT (policy DROP)
target prot opt source destination
ACCEPT all -- anywhere anywhere
REJECT tcp -- anywhere anywhere tcp dpt:auth reject-with icmp-port-unreachable
ACCEPT icmp -- anywhere anywhere icmp type 8 code 0 state NEW,RELATED,ESTABLISHED,UNTRACKED
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
ACCEPT tcp -- anywhere anywhere tcp spts:1024:65535 dpt:ftp state NEW
ACCEPT tcp -- anywhere anywhere tcp spts:1024:65535 dpt:ssh state NEW
ACCEPT tcp -- anywhere anywhere tcp spts:1024:65535 dpt:www state NEW
ACCEPT tcp -- <my-server> anywhere tcp spts:1024:65535 dpt:mysql state NEW
ACCEPT tcp -- anywhere anywhere tcp dpts:49152:65534 state NEW
ACCEPT tcp -- anywhere anywhere tcp dpt:mysql
LOG all -- anywhere anywhere limit: avg 5/min burst 5 LOG level debug prefix `iptables denied: '
ACCEPT tcp -- anywhere anywhere tcp dpt:mysql
LOG tcp -- anywhere anywhere tcp dpt:mysql LOG level debug
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Alguém tem alguma idéia para onde devo ir daqui?