Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question
    
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 Answer 1

up vote 1 down vote accepted

I recommend you to 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 to debug the problem:

  http://dev.mysql.com/doc/refman/5.5/en/communication-errors. html 
share|improve this answer
    
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

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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