SQL Error(2013) Lost Connection: reading initial communication packet
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.
My solution was to change the "bind-address" IP in the MySQL config file "/etc/mysql/my.cnf". It was set to the local IP of the server instead of "127.0.0.1" :-)
I know I cannot connect directly to the server from outside. It seems I have to set the IP to "0.0.0.0" and then use the firewall to restrict access if I want any.
Note to self: When setting up SSH, you MUST set the following option in /etc/ssh/sshd_config:
[code]AllowTcpForwarding yes[/code]
If you don't, then your packets will be silently dropped at the server. This results in the above error message.
This comment relates to SSH server configuration, or to SSH client (putty or whatever)?
Thanks
Note to self: When setting up SSH, you MUST set the following option in /etc/ssh/sshd_config:
[code]AllowTcpForwarding yes[/code]
If you don't, then your packets will be silently dropped at the server. This results in the above error message.
You saved me. Couldn’t connect to my NAS Synology because of that. Thank you.
Please login to leave a reply, or register at first.