Mysql – Lost connection to MySQL server at ‘reading initial communication packet’, system error: 0 with windows

MySQLnetworking

I found similar questions but none of them helped me with a Windows machine. I originally posted this on stack overflow but it was suggested that I ask here.

I was able to connect to MySQL through my local machine. However, I have placed MySQL on a remote machine and when I try to connect to it from the local, I get the following error:

Lost connection to MySQL server at 'reading initial communication packet', system error: 0

Im using SQL workbench to connect. I use the remote machine's actual name for the hostname and using port 139. I have MySQL started up as a service on the remote machine as well. When googling the error I get lots of jazz about editing a file in /etc/hosts.allow and my.cnf and whatnot. However, these locations were specified for Linux machines. I have a Windows 7 machine for both my local and the remote machine and therefore do not have these locations.

Any help with connecting to MySQL would be greatly appreciated.

Best Answer

http://www.heidisql.com/forum.php?t=10835

Note to self: When setting up SSH, you MUST set the following option in /etc/ssh/sshd_config:

AllowTcpForwarding yes

If you don't, then your packets will be silently dropped at the server. This results in the above error message.