MySQL error 2055: Lost connection to MySQL server at stage
The connection broke at a named stage of the protocol, with the operating-system error that caused it. Read the stage to see where it failed.
- Error number
2055- Name
CR_SERVER_LOST_EXTENDED- Category
- Connection and client
What it means
2055 is the extended form of a lost connection: the message names where in the protocol the client was (for example reading initial communication packet or handshake: reading initial communication packet) and the system error number.
A failure at the initial packet means the server, or something in front of it, closed the connection before the login started.
Common causes
- A proxy, load balancer or port forward accepts the TCP connection but can't reach MySQL behind it.
- The server closes the connection right away, for example because it can't resolve the client's host name in time or
max_connect_errorsblocked the host. - TLS negotiation failing between client and server versions.
- Network drops or timeouts between client and server.
How to fix it
-
Read the stage and system error in the message, then check the server error log at the same time for a matching line.
-
If a host was blocked after too many failed connects, clear the host cache.
FLUSH HOSTS; -- or TRUNCATE TABLE performance_schema.host_cache;
-
Test directly against the server (bypassing proxies or tunnels) to find which hop drops the connection.
Related errors
2013Lost connection to MySQL server during query2006MySQL server has gone away2026SSL connection error2003Can't connect to MySQL server on host
More connection and client errors
2002Can't connect through socket2005Unknown MySQL server host2059Authentication plugin cannot be loaded2061Authentication plugin reported error1251Client doesn't support auth protocol3159Insecure transport prohibited1158Error reading communication packets1159Got timeout reading communication packets
The code and message text are from the MySQL 8.4 Error Message Reference. Browse the full MySQL error list or search every database error.
Work on MySQL in SQLly
A native SQL client for macOS, Windows and Linux with schema-aware IntelliSense, guardrails for risky statements and clear error messages, for MySQL and the other databases you use.