content_image/767902.jpg
If the require_secure_transport  system variable is enabled, the server permits only connections that use some form of secure transport. Per the preceding remarks, connections that use TCP/IP encrypted using TLS/SSL, a socket file, or shared memory are secure connections. TCP/IP connections not encrypted using TLS/SSL and named-pipe connections are not secure. 

## Connection Compression 

See also Configuring Encrypted Connections as Mandatory. 

All transport protocols are subject to use of compression on the traffic between the client and server. If both compression and encryption are used for a given connection, compression occurs before encryption. For more information, see Section 4.2.8, “Connection Compression Control” . 

## 4.2.8 Connection Compression Control 

Connections to the server can use compression on the traffic between client and server to reduce the number of bytes sent over the connection. By default, connections are uncompressed, but can be compressed if the server and the client agree on a mutually permitted compression algorithm. 

Compressed connections originate on the client side but affect CPU load on both the client and server sides because both sides perform compression and decompression operations. Because enabling compression decreases performance, its benefits occur primarily when there is low network bandwidth, network transfer time dominates the cost of compression and decompression operations, and result sets are large. 

This section describes the available compression-control configuration parameters and the information sources available for monitoring use of compression. It applies to classic MySQL protocol connections. 

Compression control applies to connections to the server by client programs and by servers participating in source/replica replication or Group Replication. Compression control does not apply to connections for FEDERATED  tables. In the following discussion, “client connection”  is shorthand for a connection to the server originating from any source for which compression is supported, unless context indicates a specific connection type. 

## Configuring Connection Compression 

<img src='content_image/767902.jpg'>

•Configuring Connection Compression 

•Configuring Legacy Connection Compression 

•Monitoring Connection Compression 

## Note 

X Protocol connections to a MySQL Server instance support compression from MySQL 8.0.19, but compression for X Protocol connections operates independently from the compression for classic MySQL protocol connections described here, and is controlled separately. See Section 20.5.5, “Connection Compression with X Plugin”  for information on X Protocol connection compression. 

As of MySQL 8.0.18, these configuration parameters are available for controlling connection compression: 

•The protocol_compression_algorithms  system variable configures which compression algorithms the server permits for incoming connections. 

•The --compression-algorithms  and --zstd-compression-level  command-line options configure permitted compression algorithms and zstd  compression level for these client programs: mysql , mysqladmin , mysqlbinlog , mysqlcheck , mysqldump , mysqlimport , mysqlpump , 

