distal-attribute
distal-attribute
distal-attribute
distal-attribute

SQL Error(2013) Lost Connection: reading initial communication packet

User, date Message
Written by stugol
2 years ago
Category: Creating a connection
3 posts since Sun, 01 Jul 12
Hi, I am able to connect to mysql on Hostgator over TCP, which works great but ssh has caused the following error:

SQL Error (2013): Lost connection to MySQL server at 'reading inital communication packet', system error:0

I used putty and is ablke to connect to ssh and mysql without problems using the same credentials as below:

Settings:
Network type: MySQL (SSH Tunnel)
Hostname/IP: 127.0.0.1
User: mysql_user
Password: mysql_password
Port: 3306
Database: mysql_database

SSH Tunnel:
plink location: plink_location
ssh host: ssh_ip
ssh port: 2222
user: ssh_user
password: shh_password
local port: 3307

Any help is much appreciated.

Written by stugol
2 years ago
3 posts since Sun, 01 Jul 12
Anyone? Thanks in advance.
Written by ansgar
2 years ago
4940 posts since Fri, 07 Apr 06
Probably too slow connection. Or something in the SSH server which does not work as expected. Well, just guesses here. It's very difficult to debug these tunnel connections.
Written by stugol
2 years ago
3 posts since Sun, 01 Jul 12
Thanks anse, probably not too slow as I could putty in manually. Thanks a million, the program rocks but too bad can't tunnel at this time.
Written by ansgar
2 years ago
4940 posts since Fri, 07 Apr 06
At least the error message "reading inital communication packet" tells me your tunnel works, as you already touch the mysql server. Well, that does not make it easier to debug :)
Written by thadinMoney, Euro
2 years ago
8 posts since Tue, 31 Jul 12
I had the same problem.

I was able to solve it to change the bind-address on the mysql server.
It was set to only listen to the remote ip address.
When I changed it to 0.0.0.0 (all address, including localhost) it worked.
Written by achbed
1 year ago
3 posts since Wed, 22 May 13
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.
 

Please login to leave a reply, or register at first.