Linux – Lost connection to MySQL server at ‘waiting for initial communication packet’, system error: 2

linuxMySQLsshssh-tunnelUbuntu

I've just spun up a new RackSpace VPS using Ubuntu. I'm normally using CentOS so forgive me for any Ubuntu newbie mistakes.

I set up an SSH tunnel using Putty and tried to connect via SQLYog, something I've done on CentOS countless times.

I'm receiving the error message

Lost connection to MySQL server at 'waiting for initial communication packet', system error: 2

I'm connecting via local

SQLYog 127.0.0.1 8115 root

Tunnel 8115 127.0.0.1:3306

Within my.cnf I have bind-address 127.0.0.1 and skip-networking isn't there. At this point I've exhausted my knowledge.

UPDATE:

My iptables are

target     prot opt source               destination
ACCEPT     tcp  --  anywhere             anywhere             tcp spt:domain
ACCEPT     udp  --  anywhere             anywhere             udp spt:domain
ACCEPT     tcp  --  anywhere             anywhere             tcp spt:http
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:mysql
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:1337
DROP       all  --  anywhere             anywhere

I just tried removing all entries in IPTABLES and this solved the issue. Could someone let me know what I had wrong?

Thanks

Best Answer

I recommend you check if you have a firewall (iptables) or some security software (apparmor / selinux) enabled and running. Also the error log would be helpful here.

This manual page can help you debug the problem.