Tengo una instancia de MySQL ejecutándose en un servidor Debian y puedo conectarme a ella localmente sin problemas. Sin embargo, no puedo conectarme de forma remota. Cuando intento esto desde mi línea de comandos me sale el siguiente error:Intentando conectarme a un servidor MySQL remoto (error 2003)
ERROR 2003 (HY000): Can't connect to MySQL server on '<server-ip>' (110)
He añadido al usuario a MySQL como 'usuario' @ '*' y 'usuario' @ 'localhost'. skip-networking en este servidor está configurado como falso y la dirección de vinculación está comentada en my.cnf. También he intentado abrir el puerto 3306 en iptables usando el siguiente comando:
/sbin/iptables -A INPUT -i eth0 -p tcp --destination-port 3306 -j ACCEPT
Aquí es una lista de todas mis reglas de firewall iptable, que retreived el uso de 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
¿El Alguien tiene alguna idea de a dónde debería ir desde aquí?
¿Qué sucede cuando telnet a '' en 3306? –
@Mike: obtengo el mensaje "telnet: no se puede conectar al host remoto: se agotó el tiempo de espera de la conexión". – hellsgate
El error 2003 se detalla aquí: http://www.webyog.com/faq/content/23/15/en/error-no-2003-can_t-connect.html –