1

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

  • Can you check the value set for "AllowTcpForwarding" in your 'sshd config' file (found in /etc/ssh/ directory). If it is "no", try changing it to "yes" and restart the ssh server (sshd daemon) and try connecting again. – Sathish D Oct 1 '13 at 9:00
  • I have both AllowTcpForwarding yes and PermitTunnel yes, I found these from early reports of the same issue. – Adam G Oct 1 '13 at 10:47
1

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.

  • Just updated my answer, definitely an issue with my iptables. Any advice on a better set up? – Adam G Oct 1 '13 at 10:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.