2

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

2
  • 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. Commented Oct 1, 2013 at 9:00
  • I have both AllowTcpForwarding yes and PermitTunnel yes, I found these from early reports of the same issue. Commented Oct 1, 2013 at 10:47

2 Answers 2

2

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.

1
  • Just updated my answer, definitely an issue with my iptables. Any advice on a better set up? Commented Oct 1, 2013 at 10:50
0

In my case the problem was caused by the SSH server not allowing TCP forwarding (I tried to connect to a remote MySQL server over SSH).

I did this on the remote server to solve:

  1. On the remove server: open the /etc/ssh/sshd_config file in any text editor.
  2. Replace the AllowTcpForwarding no line with AllowTcpForwarding yes (add it anywhere if it doesn't exist).
  3. Restart the SSH server by executing sudo systemctl restart ssh.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.