I'm having problem connecting remotely to my MariaDB server.

I've tried more or less everything, and can open a socket with nc(nc myserver 3307) but with the mysql (mariadb) client I only get the following error:

mysql -h myserver -P 3307 -u user -pPassword
ERROR 2013 (HY000): Lost connection to MySQL server at 'reading authorization packet', system error: 54

I have looked all over, but can't find the cause of this error.

My server is running Ubuntu 14.04.2 LTS (Trusty Tahr) and I installed mariaDB with:

apt-get install mariadb-server-10.0

Any suggestions or ideas? Local connections (both over socket and ip works fine).

  • You can check here. I hope it help you. it's has a lot of details. – Racer SQL Mar 6 '15 at 14:11
  • Thank you @RafaelPiccinelli, I've tried both --skip-networking and increasing connect_timeout to 100s without success. I'm able to connect (via telnet and nc) it is the authentication that does not work. – Fredrik Erlandsson Mar 9 '15 at 8:35

I started getting this "Lost connection to MySQL server at 'reading authorization packet'", and after reading https://bugs.mysql.com/bug.php?id=28359 I found out that the client machine (debian 64bits) network interface was in 100Mbps (it is a 1Gb interface and was working in 1Gb, not sure why it fell back to 100Mbps).

I could "normal ping" and nc, without problems, but a "ping -f -s 10000" from the client to the server would show 1% lost packets.

I disconnected its RJ45, connected it back "pumping" the connector back and forth (it's an old cable/machine, maybe some oxidation had settled in), and changed the switch port, and it auto-negotiated back to 1Gbps.

Then the "ping -f -s 10000" ran ok, and the mysql errors stopped.

So you might check for the connection between client/server. The "normal ping" (small packets may be ok) and nc (may be getting retransmissions, transparent to you) may be working, but a "ping -f -s 10000" can show how it responds under more load. It seems the "Server greeting" phase of the MySql auth does not like dropped packets.

Best regards,

| improve this answer | |
  • Thank you for your suggestions. There seems to be some kind of traffic shaping between my client and server. But we are using TCP so dropped packets should not be an issue. I've left it as it is, will use a ssh tunnel to the server to connect to mysql. But it seems like mysqld is broken in some sense. (And devs just calls it DoS/security preventions) – Fredrik Erlandsson Mar 24 '15 at 7:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.