Error 2066 signals that the client and server negotiated a compression algorithm that is not enabled or supported on one side of the MySQL connection.
MySQL Error 2066: CR_COMPRESSION_WRONGLY_CONFIGURED means the client asked for a compression algorithm the server does not allow, or vice-versa. Align both sides' compression settings or disable compression to resolve the issue.
Connection failed due to wrongly configured compression algorithm CR_COMPRESSION_WRONGLY_CONFIGURED was added in 8.0.18.
Error 2066 appears during the initial handshake when the client library and the MySQL server cannot agree on a compression algorithm. The message usually surfaces after upgrading to MySQL 8.0.18+, where new algorithms (zstd, lz4, zlib) became negotiable.
The failure terminates the session before authentication, so no SQL reaches the server.
Production services that mandate compression will fail to connect until the mismatch is resolved.
An unsupported algorithm name in the client --compression-algorithms option immediately triggers the error. If the server variable mysql_compression_algorithm or mysqlx_compression_algorithms omits that name, the handshake aborts.
Mixed MySQL versions also cause trouble - a 5.7 client knows only zlib while an 8.0.32 server might default to zstd.
Network proxies that strip capability flags can break the negotiation too.
First, list the algorithms the server permits: SHOW VARIABLES LIKE 'mysql%compression%';
. Make sure the client only requests those names. Reload the mysqld variable or restart if you change it.
If alignment is impossible, disable compression with --skip-compression
on the client or set compression=OFF
in your connector settings.
Galaxy users can edit the connection profile once and share the fix across all teammates.
Containerized apps often ship an older libmysqlclient. Rebuild the image against the same minor version as the server or add --compression-algorithms=zlib
until you upgrade.
MySQL Router in front of InnoDB Cluster might drop the compression capability flag.
Upgrade Router to 8.0.18+ or start it with --compression-algorithms
matching the servers.
Standardize MySQL minor versions across dev, staging, and prod. Commit the chosen algorithms to configuration management and review them during upgrades.
Monitor failed connection counts in PERFORMANCE_SCHEMA.session_connect_attrs.
Alert when CR_COMPRESSION_WRONGLY_CONFIGURED appears so you can react before users notice.
Error 2059 (CR_AUTH_PLUGIN_CANNOT_LOAD) pops up for unsupported auth plugins and is resolved by aligning plugin lists like compression algorithms.
Error 1251 (ER_UNSUPPORTED_AUTH_MODE) indicates a mismatch between the client authentication plugins rather than compression. Upgrade the client or change the user plugin.
.
If you use SET PERSIST, a restart is needed only when the variable is marked restart required. In 8.0.32, mysql_compression_algorithm needs a restart while mysqlx_compression_algorithms does not.
Yes. Each connection negotiates independently. Just ensure every node lists both algorithms so any client choice succeeds.
Query PERFORMANCE_SCHEMA.session_status for the variable COMPRESSION_USED or view the session_connect_attrs table.
The upgrade may have altered the default algorithm list. Review release notes for changes and update client options accordingly.