SSL Configuration

When you finish generating the SSL certificates for your cluster, you need to enable it for each node. If you have not yet generated the SSL certificates, see SSL Certificates for a guide on how to do so.


For Gelera Cluster, SSL configurations are not dynamic. Since they must be set on every node in the cluster, if you are enabling this feature with a running cluster you need to restart the entire cluster.

Enabling SSL

There are three vectors that you can secure through SSL: traffic between the database server and client, replication traffic within Galera Cluster, and the State Snapshot Transfer.


The configurations shown here cover the first two. The procedure for securing state snapshot transfers through SSL varies depending on the SST method you use. For more information, see SSL for State Snapshot Transfers.

Securing the Database

For securing database server and client connections, you can use the internal MySQL SSL support. In the event that you use logical transfer methods for state snapshot transfer, such as mysqldump, this is the only step you need to take in securing your state snapshot transfers.

In the configuration file, (my.cnf), add the follow parameters to each unit:

# MySQL Server
ssl-ca = /path/to/ca-cert.pem
ssl-key = /path/to/server-key.pem
ssl-cert = /path/to/server-cert.pem

# MySQL Client Configuration
ssl-ca = /path/to/ca-cert.pem
ssl-key = /path/to/client-key.pem
ssl-cert = /path/to/client-cert.pem

These parameters tell the database server and client which files to use in encrypting and decrypting their interactions through SSL. The node will begin to use them once it restarts.

Securing Replication Traffic

In order to enable SSL on the internal node processes, you need to define the paths to the key, certificate and certificate authority files that you want the node to use in encrypting replication traffic.

You can configure these options through the wsrep_provider_options parameter in the configuration file, (that is, my.cnf).


This tells Galera Cluster which files to use in encrypting and decrypting replication traffic through SSL. The node will begin to use them once it restarts.

Configuring SSL

In the event that you want or need to further configure how the node uses SSL, Galera Cluster provides some additional parameters, including defining the cyclic redundancy check and setting the cryptographic cipher algorithm you want to use.


See Also: For a complete list of available configurations available for SSL, see the options with the socket. prefix at Galera Parameters.

Configuring the Socket Checksum

Using the socket.checksum parameter, you can define whether or which cyclic redundancy check the node uses in detecting errors. There are three available settings for this parameter, which are defined by an integer:

  • 0 Disables the checksum.
  • 1 Enables the CRC-32 checksum.
  • 2 Enables the CRC-32C checksum.

The default configuration for this parameter is 1 or 2 depending upon your version. CRC-32C is optimized for and potentially hardware accelerated on Intel CPU’s.

wsrep_provider_options = "socket.checksum=2"

Configuring the Encryption Cipher

Using the socket.ssl_cipher parameter, you define which cipher the node uses in encrypting replication traffic. Galera Cluster uses whatever ciphers are available to the SSL implementation installed on the nodes. For instance, if you install OpenSSL on your node, Galera Cluster can use any cryptographic algorithms OpenSSL uses in ciphers.

The SSL configuration for Galera Cluster defaults to AES128-SHA, as this setting is considerably faster and no less secure than AES256.

wsrep_provider_options = "socket.ssl_cipher=AES128-SHA"