// MySQL error reference

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
Error message
Lost connection to MySQL server at '%s', system error: %d

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_errors blocked the host.
  • TLS negotiation failing between client and server versions.
  • Network drops or timeouts between client and server.

How to fix it

  1. Read the stage and system error in the message, then check the server error log at the same time for a matching line.

  2. If a host was blocked after too many failed connects, clear the host cache.

    FLUSH HOSTS;  -- or TRUNCATE TABLE performance_schema.host_cache;
  3. Test directly against the server (bypassing proxies or tunnels) to find which hop drops the connection.

Related errors

More connection and client errors

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.

// fewer errors, faster fixes

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.