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

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

stugol posted 2 years ago in Creating a connection
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.

stugol posted 2 years ago
Anyone? Thanks in advance.
ansgar posted 2 years ago
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.
stugol posted 2 years ago
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.
ansgar posted 2 years ago
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 :)
thadin posted 2 years ago
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.
achbed posted 1 year ago
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.