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

carloscastaneda's profile image carloscastaneda posted 4 years ago in HeidiSQL portable Permalink

I'm currently somewhat lost too! I had to restore my nextcloud installation from a backup. Since then I get the above error and I don't know what the reason is. I have already tried everything in the connection chapter without success. For mysql I have opened port 3306 and set bind-listener to 0.0.0.0. That should make it work. If I call the mysql client directly, I can log in. I suspect it has something to do with the SSH tunnel. I can call the plink successfully manually. Does anyone have any other ideas as to what the problem could be? It used to work so far and I have no idea what might be the difference now. Probably a small setting somewhere... Thanks in advance.

carloscastaneda's profile image carloscastaneda posted 4 years ago Permalink

I found the reason: AllowTcpForwarding has to be set to yes.

I have undone the changes mentioned above.

KapibaraYT's profile image KapibaraYT posted 1 year ago Permalink

Hey where do i set it to yes?

zfr Pro's profile image zfr Pro posted 2 weeks ago Permalink

mysql cannot connect, this error "Lost connection to server at handshake reading initial communication packet, system error:0

why and how to solve?

1 attachment(s):
  • sql
ansgar's profile image ansgar posted 2 weeks ago Permalink

zfr Pro: First thing to try out is the different provided libraries, e.g. libmysql, libmariadb, and the others if any.

You should also post some relevant connection settings here, like SSL on/off, and SSH tunneling used, etc. Be sure to keep out sensitive data here.

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