2

I have a MariaDB 10.1.26 virtual server running on Debian 9. It is connected to via ssh tunnel and the bind address = localhost. It has been working without fail untill recently. Now when I connect via ssh tunnel I get the error

ERROR 2013 (HY000): Lost connection to MySQL server at 'reading initial communication packet'. system error: 0 "Internal error/check (Not system error)"

Connecting locally is ok. Changing the bind address to 0.0.0.0 allows the ssh connections to work. The exact moment the ssh connections failed the only thing I was doing was trying to connect to the server with PHP with mysqli but can't see this being the cause. I have firewalled the port used but would like to change the bind address back. What would cause this change?

Thanks

EDIT: added full error message. EDIT: I ran strace -e trace=network mysql -u <user> -p -h 127.0.0.1 the line where the error occurs is: recvfrom(3, "", 16384, 0, NULL, NULL) = 0 this recvfrom on a working connection reads recvfrom(3, "b\0\0\0\n5.5.5-10.1.26-MariaDB-0+deb"..., 16384, 0, NULL, NULL) = 102

EDIT: I changed bind-address = localhost to bind-address =127.0.0.1 and it works fine now? My /etc/hosts file hasnt changed.

Èl Sea
  • 21
  • 1
  • 3

0 Answers0