Connection Compression Control The legacy compression parameters interact with the newer parameters and their semantics change as follows: •The meaning of the legacy  --compress  option depends on whether  --compression-algorithms  is specified: •When  --compression-algorithms  is not specified,  --compress  is equivalent to specifying a client-side algorithm set of  zlib,uncompressed . •When  --compression-algorithms  is specified,  --compress  is equivalent to specifying an algorithm set of  zlib  and the full client-side algorithm set is the union of  zlib  plus the algorithms specified by  --compression-algorithms . For example, with both  -- compress  and  --compression-algorithms=zlib,zstd , the permitted-algorithm set is  zlib  plus  zlib,zstd ; that is,  zlib,zstd . With both  --compress  and  -- compression-algorithms=zstd,uncompressed , the permitted-algorithm set is  zlib  plus zstd,uncompressed ; that is,  zlib,zstd,uncompressed . •The same type of interaction occurs between the legacy  MYSQL_OPT_COMPRESS  option and the MYSQL_OPT_COMPRESSION_ALGORITHMS  option for the  mysql_options() C API function. •If the  slave_compressed_protocol  system variable is enabled, it takes precedence over MASTER_COMPRESSION_ALGORITHMS  and connections to the source use  zlib  compression if both source and replica permit that algorithm. If  slave_compressed_protocol  is disabled, the value of MASTER_COMPRESSION_ALGORITHMS  applies. Note The legacy compression-control parameters are deprecated as of MySQL 8.0.18; expect it to be removed in a future version of MySQL. Monitoring Connection Compression The  Compression  status variable is  ON  or  OFF  to indicate whether the current connection uses compression. The  mysql  client  \status  command displays a line that says  Protocol: Compressed  if compression is enabled for the current connection. If that line is not present, the connection is uncompressed. As of 8.0.14, the MySQL Shell  \status  command displays a  Compression:  line that says  Disabled  or Enabled  to indicate whether the connection is compressed. As of MySQL 8.0.18, these additional sources of information are available for monitoring connection compression: •To monitor compression in use for client connections, use the  Compression_algorithm  and Compression_level  status variables. For the current connection, their values indicate the compression algorithm and compression level, respectively. •To determine which compression algorithms the server is configured to permit for incoming connections, check the  protocol_compression_algorithms  system variable. •For source/replica replication connections, the configured compression algorithms and compression level are available from multiple sources: •The Performance Schema  replication_connection_configuration  table has COMPRESSION_ALGORITHMS  and  ZSTD_COMPRESSION_LEVEL  columns. 380