All pages
Powered by GitBook
1 of 22

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

wsrep_sst_method

Overview

State snapshot transfer method.

DETAILS

PARAMETERS

Command-line

--wsrep_sst_method=arg

Configuration file

Supported

Dynamic

Yes

Scope

Global

Data Type

VARCHAR

Product Default Value

rsync

Reference

Galera Cluster for MariaDB offers synchronous multi-master replication with high availability, no data loss, and simplified, consistent scaling.

WSREP Variable Details

Galera Cluster Status Variables

Viewing Galera Cluster Status Variables

Galera status variables can be viewed with the statement.

See also the .

List of Galera Cluster status variables

MariaDB Galera Cluster has the following status variables:

wsrep_applier_thread_count

  • Description: Stores the current number of applier threads to make clear how many slave threads of this type there are.

wsrep_apply_oooe

  • Description: How often write sets have been applied out of order, an indicator of parallelization efficiency.

wsrep_apply_oool

  • Description: How often write sets with a higher sequence number were applied before ones with a lower sequence number, implying slow write sets.

wsrep_apply_window

  • Description: Average distance between highest and lowest concurrently applied seqno.

wsrep_cert_deps_distance

  • Description: Average distance between the highest and the lowest sequence numbers that can possibly be applied in parallel, or the potential degree of parallelization.

wsrep_cert_index_size

  • Description: The number of entries in the certification index.

wsrep_cert_interval

  • Description: Average number of transactions received while a transaction replicates.

wsrep_cluster_capabilities

  • Description:

wsrep_cluster_conf_id

  • Description: Total number of cluster membership changes that have taken place.

wsrep_cluster_size

  • Description: Number of nodes currently in the cluster.

wsrep_cluster_state_uuid

  • Description: UUID state of the cluster. If it matches the value in , the local and cluster nodes are in sync.

wsrep_cluster_status

  • Description: Cluster component status. Possible values are PRIMARY (primary group configuration, quorum present), NON_PRIMARY (non-primary group configuration, quorum lost), or DISCONNECTED (not connected to group, retrying).

wsrep_cluster_weight

  • Description: The total weight of the current members in the cluster. The value is counted as a sum of pc.weight of the nodes in the current primary component.

wsrep_commit_oooe

  • Description: How often a transaction was committed out of order.

wsrep_commit_oool

  • Description: No meaning.

wsrep_commit_window

  • Description: Average distance between highest and lowest concurrently committed seqno.

wsrep_connected

  • Description: Whether or not MariaDB is connected to the wsrep provider. Possible values are ON or OFF.

wsrep_desync_count

  • Description: Returns the number of operations in progress that require the node to temporarily desync from the cluster.

wsrep_evs_delayed

  • Description: Provides a comma separated list of all the nodes this node has registered on its delayed list.

wsrep_evs_evict_list

  • Description: Lists the UUID’s of all nodes evicted from the cluster. Evicted nodes cannot rejoin the cluster until you restart their mysqld processes.

wsrep_evs_repl_latency

  • Description: This status variable provides figures for the replication latency on group communication. It measures latency (in seconds) from the time point when a message is sent out to the time point when a message is received. As replication is a group operation, this essentially gives you the slowest ACK and longest RTT in the cluster. The format is min/avg/​max/stddev

wsrep_evs_state

  • Description: Shows the internal state of the EVS protocol.

wsrep_flow_control_paused

  • Description: The fraction of time since the last FLUSH STATUS command that replication was paused due to flow control.

wsrep_flow_control_paused_ns

  • Description: The total time spent in a paused state measured in nanoseconds.

wsrep_flow_control_recv

  • Description: Number of FC_PAUSE events received as well as sent since the most recent status query.

wsrep_flow_control_sent

  • Description: Number of FC_PAUSE events sent since the most recent status query

wsrep_gcomm_uuid

  • Description: The UUID assigned to the node.

wsrep_incoming_addresses

  • Description: Comma-separated list of incoming server addresses in the cluster component.

wsrep_last_committed

  • Description: Sequence number of the most recently committed transaction.

wsrep_local_bf_aborts

  • Description: Total number of high-priority local transactions aborts caused by replication applier threads.

wsrep_local_cached_downto

  • Description: The lowest sequence number, or seqno, in the write-set cache (GCache).

wsrep_local_cert_failures

  • Description: Total number of local transactions that failed the certification test and consequently issued a voluntary rollback.

wsrep_local_commits

  • Description: Total number of local transactions committed on the node.

wsrep_local_index

  • Description: The node's index in the cluster. The index is zero-based.

wsrep_local_recv_queue

  • Description: Current length of the receive queue, which is the number of write sets waiting to be applied.

wsrep_local_recv_queue_avg

  • Description: Average length of the receive queue since the most recent status query. If this value is noticeably larger than zero, the node is likely to be overloaded and cannot apply the write sets as quickly as they arrive, resulting in replication throttling.

wsrep_local_recv_queue_max

  • Description: The maximum length of the recv queue since the last FLUSH STATUS command.

wsrep_local_recv_queue_min

  • Description: The minimum length of the recv queue since the last FLUSH STATUS command.

wsrep_local_replays

  • Description: Total number of transaction replays due to asymmetric lock granularity.

wsrep_local_send_queue

  • Description: Current length of the send queue, which is the number of write sets waiting to be sent.

wsrep_local_send_queue_avg

  • Description: Average length of the send queue since the most recent status query. If this value is noticeably larger than zero, there are most likely network throughput or replication throttling issues.

wsrep_local_send_queue_max

  • Description: The maximum length of the send queue since the last FLUSH STATUS command.

wsrep_local_send_queue_min

  • Description: The minimum length of the send queue since the last FLUSH STATUS command.

wsrep_local_state

  • Description: Internal Galera Cluster FSM state number.

wsrep_local_state_comment

  • Description: Human-readable explanation of the state.

wsrep_local_state_uuid

  • Description: The node's UUID state. If it matches the value in , the local and cluster nodes are in sync.

wsrep_open_connections

  • Description: The number of open connection objects inside the wsrep provider.

wsrep_open_transactions

  • Description: The number of locally running transactions that have been registered inside the wsrep provider. This means transactions that have made operations that have caused write set population to happen. Transactions that are read-only are not counted.

wsrep_protocol_version

  • Description: The wsrep protocol version being used.

wsrep_provider_name

  • Description: The name of the provider. The default is "Galera".

wsrep_provider_vendor

  • Description: The vendor string.

wsrep_provider_version

  • Description: The version number of the Galera wsrep provider

wsrep_ready

  • Description: Whether or not the Galera wsrep provider is ready. Possible values are ON or OFF

wsrep_received

  • Description: Total number of write sets received from other nodes.

wsrep_received_bytes

  • Description: Total size in bytes of all write sets received from other nodes.

wsrep_repl_data_bytes

  • Description: Total size of data replicated.

wsrep_repl_keys

  • Description: Total number of keys replicated.

wsrep_repl_keys_bytes

  • Description: Total size of keys replicated.

wsrep_repl_other_bytes

  • Description: Total size of other bits replicated.

wsrep_replicated

  • Description: Total number of write sets replicated to other nodes.

wsrep_replicated_bytes

  • Description: Total size in bytes of all write sets replicated to other nodes.

wsrep_rollbacker_thread_count

  • Description: Stores the current number of rollbacker threads to make clear how many slave threads of this type there are.

wsrep_thread_count

  • Description: Total number of wsrep (applier/rollbacker) threads.

This page is licensed: CC BY-SA / Gnu FDL

socket.ssl_cert

Overview

Defines the path to the SSL certificate.

The wsrep_provider_options system variable applies to MariaDB Enterprise Cluster, powered by Galera and to Galera Cluster available with MariaDB Community Server. This page relates specifically to the socket.ssl_cert wsrep_provider_options.

socket.ssl

Overview

Explicitly enables TLS usage by the wsrep provider.

The wsrep_provider_options system variable applies to MariaDB Enterprise Cluster, powered by Galera and to Galera Cluster available with MariaDB Community Server. This page relates specifically to the socket.ssl wsrep_provider_options.

socket.ssl_key

Overview

Defines the path to the SSL certificate key.

The wsrep_provider_options system variable applies to MariaDB Enterprise Cluster, powered by Galera and to Galera Cluster available with MariaDB Community Server. This page relates specifically to the socket.ssl_key wsrep_provider_options.

wsrep_sst_common

wsrep_sst_common Variables

The wsrep_sst_common script provides shared functionality used by various State Snapshot Transfer (SST) methods in Galera Cluster. It centralizes the handling of common configurations such as authentication credentials, SSL/TLS encryption parameters, and other security-related settings. This ensures consistent and secure communication between cluster nodes during the SST process.

The wsrep_sst_common script parses the following options:


wsrep_cluster_name

Overview

Name for the cluster.

Details

This system variable specifies the logical name of the cluster. Every Cluster Node that connects to each other must

ssl_ca

Overview

CA file in PEM format (check OpenSSL docs, implies --ssl).

Details

ssl_capath

Overview

CA directory (check OpenSSL docs, implies --ssl).

Details

SHOW STATUS LIKE 'wsrep%';
  • WSREP_SST_OPT_AUTH (wsrep-sst-auth)

    • Description: Defines the authentication credentials used by the State Snapshot Transfer (SST) process, typically formatted as user:password. These credentials are essential for authenticating the SST user on the donor node, ensuring that only authorized joiner nodes can initiate and receive data during the SST operation. Proper configuration of this variable is critical to maintain the security and integrity of the replication process between Galera cluster nodes.


  • tcert (tca)

    • Description: Specifies the Certificate Authority (CA) certificate file used for SSL/TLS encryption during State Snapshot Transfers (SSTs). When encryption is enabled, this certificate allows the joining node (client) to authenticate the identity of the donor node, ensuring secure and trusted communication between them.


  • tcap (tcapath)

    • Description: Specifies the path to a directory that contains a collection of trusted Certificate Authority (CA) certificates. Instead of providing a single CA certificate file, this option allows the use of multiple CA certificates stored in separate files within the specified directory. It is useful in environments where trust needs to be established with multiple certificate authorities.


  • tpem (tcert)

    • Description: This variable stores the path to the TLS/SSL certificate file for the specific node. The certificate, typically in PEM format, is used by the node to authenticate itself to other nodes during secure SST operations. It is derived from the tcert option in the [sst] section.


  • tkey (tkey)

    • Description: Represents the private key file that corresponds to the public key certificate specified by tpem. This private key is essential for decrypting data and establishing a secure connection during State Snapshot Transfer (SST). It enables the receiving node to authenticate encrypted information and participate in secure replication within the cluster.

Parameters

Command-line

--ssl_ca=arg

Configuration file

Supported

Dynamic

No

Scope

Global

Data Type

VARCHAR

Product Default Value

"" (an empty string)

Parameters

Command-line

--ssl_capath=arg

Configuration file

Supported

Dynamic

No

Scope

Global

Data Type

VARCHAR

Product Default Value

"" (an empty string)

Details

The node uses the certificate as a self-signed public key in encrypting replication traffic over SSL. You can use either an absolute path or one relative to the working directory. The file must use PEM format.

Option Name

socket.ssl_cert

Default Value

"" (an empty string)

Dynamic

NO

Debug

NO

Examples

Display Current Value

wsrep_provider_options define optional settings the node passes to the wsrep provider.

To display current wsrep_provider_options values:

The expected output will display the option and the value. Options with no default value, for example SSL options, will not be displayed in the output.

Set in Configuration File

When changing a setting for a wsrep_provider_options in the config file, you must list EVERY option that is to have a value other than the default value. Options that are not explicitly listed are reset to the default value.

Options are set in the my.cnf configuration file. Use the ; delimiter to set multiple options.

The configuration file must be updated on each node. A restart to each node is needed for changes to take effect.

Use a quoted string that includes every option where you want to override the default value. Options that are not in the list will reset to their default value.

To set the option in the configuration file:

Set Dynamically

The socket.ssl_cert option cannot be set dynamically. It can only be set in the configuration file.

Trying to change a non-dynamic option with SET results in an error:

Details

The socket.ssl option is used to specify if SSL encryption should be used.

Option Name

socket.ssl

Default Value

NO

Dynamic

NO

Debug

NO

Examples

Display Current Value

wsrep_provider_options define optional settings the node passes to the wsrep provider.

To display current wsrep_provider_options values:

The expected output will display the option and the value. Options with no default value, for example SSL options, will not be displayed in the output.

Set in Configuration File

When changing a setting for a wsrep_provider_options in the config file, you must list EVERY option that is to have a value other than the default value. Options that are not explicitly listed are reset to the default value.

Options are set in the my.cnf configuration file. Use the ; delimiter to set multiple options.

The configuration file must be updated on each node. A restart to each node is needed for changes to take effect.

Use a quoted string that includes every option where you want to override the default value. Options that are not in the list will reset to their default value.

To set the option in the configuration file:

Set Dynamically

The socket.ssl option cannot be set dynamically. It can only be set in the configuration file.

Trying to change a non-dynamic option with SET results in an error:

Details

The node uses the certificate key, a self-signed private key, in encrypting replication traffic over SSL. You can use either an absolute path or one relative to the working directory. The file must use PEM format.

Option Name

socket.ssl_key

Maximum Value

"" (an empty string)

Dynamic

NO

Debug

NO

Examples

Display Current Value

wsrep_provider_options define optional settings the node passes to the wsrep provider.

To display current wsrep_provider_options values:

The expected output will display the option and the value. Options with no default value, for example SSL options, will not be displayed in the output.

Set in Configuration File

When changing a setting for a wsrep_provider_options in the config file, you must list EVERY option that is to have a value other than the default value. Options that are not explicitly listed are reset to the default value.

Options are set in the my.cnf configuration file. Use the ; delimiter to set multiple options.

The configuration file must be updated on each node. A restart to each node is needed for changes to take effect.

Use a quoted string that includes every option where you want to override the default value. Options that are not in the list will reset to their default value.

To set the option in the configuration file:

Set Dynamically

The socket.ssl_key option cannot be set dynamically. It can only be set in the configuration file.

Trying to change a non-dynamic option with SET results in an error:

SHOW GLOBAL VARIABLES LIKE 'wsrep_provider_options';
wsrep_provider_options='socket.ssl_cert=/path/to/server-cert.pem;gcache.debug=YES;gcs.fc_limit=NO;socket.send_buf_size=NO;evs.keepalive_period=PT3S'
ERROR 1210 (HY000): Incorrect arguments to SET
SHOW GLOBAL VARIABLES LIKE 'wsrep_provider_options';
wsrep_provider_options='socket.ssl=YES;gcache.debug=YES;gcs.fc_limit=NO;socket.send_buf_size=NO;evs.keepalive_period=PT3S'
ERROR 1210 (HY000): Incorrect arguments to SET
SHOW GLOBAL VARIABLES LIKE 'wsrep_provider_options';
wsrep_provider_options='socket.ssl_key=/path/to/server-key.pem;gcache.debug=YES;gcs.fc_limit=NO;socket.send_buf_size=NO;evs.keepalive_period=PT3S'
ERROR 1210 (HY000): Incorrect arguments to SET
have the same logical name in order to form a component or join the Primary Component.

Parameters

Command-line

--wsrep_cluster_name=arg

Configuration file

Supported

Dynamic

Yes

Scope

Global

Data Type

VARCHAR

Product Default Value

my_wsrep_cluster

Examples

Configuration

Set the cluster name using an options file:

Show Configuration

To view the current cluster name, use the statement:

wsrep_local_state_uuid
wsrep_cluster_state_uuid

wsrep_sst_mariabackup

wsrep_sst_mariabackup Variables

The wsrep_sst_mariabackup script handles the actual data transfer and processing during an SST. The variables it reads from the [sst] group control aspects of the backup format, compression, transfer mechanism, and logging.

The wsrep_sst_mariadbbackup script parses the following options:

  • sfmt (streamfmt)

    • Default: mbstream

    • Description: Defines the streaming format used by mariabackup for the SST. mbstream indicates that mariabackup will output a continuous stream of data. Other potential values (though not explicitly shown as defaults) might be related to different backup methods or tools.


  • tfmt (transferfmt)

    • Default: socat

    • Description: Specifies the transfer format or utility used to move the data stream from the donor to the joiner node. socat is a common command-line tool for data transfer, often used for setting up various network connections.


  • sockopt (socket options)

    • Description: Allows additional socket options to be passed to the underlying network communication. This could include settings for TCP buffers, keep-alives, or other network-related tunables to optimize the transfer performance.


  • progress

    • Description: Likely controls whether progress information about the SST is displayed or logged. Setting this could enable visual indicators or detailed log entries about the transfer's advancement.


  • ttime (time)

    • Default: 0

    • Description: Possibly a timeout value in seconds for certain operations during the SST, or a flag related to timing the transfer. A value of 0 might indicate no timeout or that timing is handled elsewhere.


  • cpat

    • Description: Appears to be related to a "copy pattern" or specific path handling during the SST. Its exact function would depend on how the wsrep_sst_mariabackup script uses this pattern for file or directory management.


  • scomp (compressor)

    • Description: Specifies the compression utility to be used on the data stream before transfer. Common values could include gzip, pigz, lz4, or qpress, which reduce the data size for faster transmission over the network.


  • sdecomp (decompressor)

    • Description: Specifies the decompression utility to be used on the receiving end (joiner node) to decompress the data stream that was compressed by scomp. It should correspond to the scomp setting.


  • rlimit (resource limit)

    • Description: Potentially sets resource limits for the mariabackup process during the SST. This could include limits on CPU usage, memory, or file descriptors, preventing the SST from consuming excessive resources and impacting the server's performance.


  • uextra (use-extra)

    • Default: 0

    • Description: A boolean flag (0 or 1) that likely indicates whether to use extra or advanced features/parameters during the SST. The specific "extra" features would be determined by the mariabackup implementation.


  • speciald (sst-special-dirs)

    • Default: 1

    • Description: A boolean flag (0 or 1) that likely controls whether mariabackup should handle special directories (e.g., innodb_log_group_home_dir, datadir


  • stimeout (sst-initial-timeout)

    • Default: 300

    • Description: Sets an initial timeout in seconds for the SST process. If the SST doesn't make progress or complete within this initial period, it might be aborted.


  • ssyslog (sst-syslog)

    • Default: 0

    • Description: A boolean flag (0 or 1) that likely controls whether SST-related messages should be logged to syslog. This can be useful for centralized logging and monitoring of Galera cluster events.


  • sstlogarchive (sst-log-archive)

    • Default: 1

    • Description: A boolean flag (0 or 1) that likely determines whether SST logs should be archived. Archiving logs helps in post-mortem analysis and troubleshooting of SST failures.


  • sstlogarchivedir (sst-log-archive-dir)

    • Description: Specifies the directory where SST logs should be archived if sstlogarchive is enabled.

socket.ssl_ca

Overview

Defines the path to the SSL Certificate Authority (CA) file.

The wsrep_provider_options system variable applies to MariaDB Enterprise Cluster, powered by Galera and to Galera Cluster available with MariaDB Community Server. This page relates specifically to the socket.ssl_ca wsrep_provider_options.

Details

The node uses the CA file to verify the signature on the certificate. You can use either an absolute path or one relative to the working directory. The file must use PEM format.

Examples

Display Current Value

wsrep_provider_options define optional settings the node passes to the wsrep provider.

To display current wsrep_provider_options values:

The expected output will display the option and the value. Options with no default value, for example SSL options, will not be displayed in the output.

Set in Configuration File

When changing a setting for a wsrep_provider_options in the config file, you must list EVERY option that is to have a value other than the default value. Options that are not explicitly listed are reset to the default value.

Options are set in the my.cnf configuration file. Use the ; delimiter to set multiple options.

The configuration file must be updated on each node. A restart to each node is needed for changes to take effect.

Use a quoted string that includes every option where you want to override the default value. Options that are not in the list will reset to their default value.

To set the option in the configuration file:

Set Dynamically

The socket.ssl_ca option cannot be set dynamically. It can only be set in the configuration file.

Trying to change a non-dynamic option with SET results in an error:

gcs.check_appl_proto

Controls whether the node performs application-level protocol version checks when joining a cluster.

The wsrep_provider_options system variable applies to MariaDB Enterprise Cluster, powered by Galera and to Galera Cluster available with MariaDB Community Server. This page relates specifically to the gcs.check_appl_proto wsrep_provider_options.

Details

Galera Cluster automatically uses the highest protocol version supported by all nodes. This prevents older nodes, which lack support for newer features, from joining or disrupting the cluster until an upgrade solution is available.

However, MySQL and MariaDB have evolved differently, and their internal protocol versions are incomparable. This incompatibility prevents a mixed-node cluster (MySQL nodes and MariaDB nodes) from forming, which blocks rolling migrations.

Migration Usage: When (e.g., Percona XtraDB Cluster) to MariaDB Galera Cluster, this parameter must be set to FALSE (OFF) on all nodes to disable the protocol check. Once the cluster is fully migrated to MariaDB, it should be set back to TRUE.

Known reporting issue in early versions

The variable may appear as OFF in plugins even though the default behavior is TRUE. Explicitly configure it to ensure the desired state during migration.

Option Name
gcs.check_appl_proto

Examples

Display Current Value

wsrep_provider_options define optional settings the node passes to the wsrep provider.

To display current wsrep_provider_options values:

The expected output will display the option and the value. Options with no default value will not be displayed in the output.

Set in Configuration File

When changing a setting for a wsrep_provider_options in the config file, you must list EVERY option that is to have a value other than the default value. Options that are not explicitly listed are reset to the default value.

Options are set in the my.cnf configuration file. Use the ; delimiter to set multiple options.

The configuration file must be updated on each node. A restart to each node is needed for changes to take effect.

Use a quoted string that includes every option where you want to override the default value. Options that are not in the list will reset to their default value.

To set the option in the configuration file (example for migration):

Set Dynamically

The gcs.check_appl_proto option cannot be set dynamically. It can only be set in the configuration file.

Trying to change a non-dynamic option with SET results in an error:

ssl_key

Overview

X509 key in PEM format (implies --ssl).

Details

Parameters

wsrep_certificate_expiration_hours_warning

Overview

Print warning about certificate expiration if the X509 certificate used for wsrep connections is about to expire in hours given as an argument. If the value is 0, warnings are not printed.

Usage

The wsrep_certificate_expiration_hours_warning system variable can be set in a configuration file:

The global value of the wsrep_certificate_expiration_hours_warning system variable can also be set dynamically at runtime by executing :

When the wsrep_certificate_expiration_hours_warning system variable is set dynamically at runtime, its value will be reset the next time the server restarts. To make the value persist on restart, set it in a configuration file too.

Details

The wsrep_certificate_expiration_hours_warning system variable can be used to configure certificate expiration warnings for MariaDB Enterprise Cluster, powered by Galera:

  • When the wsrep_certificate_expiration_hours_warning system variable is set to 0, certificate expiration warnings are not printed to the .

  • When the wsrep_certificate_expiration_hours_warning system variable is set to a value N, which is greater than 0, certificate expiration warnings are printed to the MariaDB Error Log when the node's certificate expires in N hours or less.

Parameters

ssl_cert

Overview

X509 cert in PEM format (implies --ssl).

Details

Parameters

[mariadb]
wsrep_provider        = /usr/lib/galera/libgalera_smm.so
wsrep_cluster_name    = example_cluster
wsrep_cluster_address = gcomm://192.0.2.1,192.0.2.2,192.0.2.3
SHOW VARIABLES LIKE "wsrep_cluster_name";
+--------------------+-----------------+
| Variable_name      | Value           |
+--------------------+-----------------+
| wsrep_cluster_name | example_cluster |
+--------------------+-----------------+
) in a specific way during the SST, rather than just copying them as regular files. This is important for maintaining data consistency.

Command-line

--ssl_key=arg

Configuration file

Supported

Dynamic

No

Scope

Global

Data Type

VARCHAR

Product Default Value

"" (an empty string)

Command-line

--ssl_cert=arg

Configuration file

Supported

Dynamic

No

Scope

Global

Data Type

VARCHAR

Product Default Value

"" (an empty string)

Option Name

socket.ssl_ca

Default Value

"" (an empty string)

Dynamic

NO

Debug

NO

SHOW GLOBAL VARIABLES LIKE 'wsrep_provider_options';
wsrep_provider_options='socket.ssl_ca=/path/to/ca-cert.pem;gcache.debug=YES;gcs.fc_limit=NO;socket.send_buf_size=NO;evs.keepalive_period=PT3S'
ERROR 1210 (HY000): Incorrect arguments to SET

0

Command-line

--wsrep_certificate_expiration_hours_warning=#

Configuration file

Supported

Dynamic

Yes

Scope

Global

Data Type

BIGINT UNSIGNED

Minimum Value

0

Maximum Value

18446744073709551615

Product Default Value

Default Value

TRUE

Dynamic

NO

Debug

NO

[mariadb]
...
# warn 3 days before certificate expiration
wsrep_certificate_expiration_hours_warning=72
SET GLOBAL wsrep_certificate_expiration_hours_warning=72;
SHOW GLOBAL VARIABLES LIKE 'wsrep_provider_options';
wsrep_provider_options='gcs.check_appl_proto=FALSE;gcache.size=512M;gcs.fc_limit=32'
ERROR 1210 (HY000): Incorrect arguments to SET

wsrep_ssl_mode

This system variable is available from MariaDB 11.4 and 10.6.

Select which SSL implementation is used for wsrep provider communications: PROVIDER - wsrep provider internal SSL implementation; SERVER - use server side SSL implementation; SERVER_X509 - as SERVER and require valid X509 certificate.

Usage

The wsrep_ssl_mode system variable is used to configure the WSREP TLS Mode used by MariaDB Enterprise Cluster, powered by Galera.

When set to SERVER or SERVER_X509, MariaDB Enterprise Cluster uses the TLS configuration for MariaDB Enterprise Server:

When set to PROVIDER, MariaDB Enterprise Cluster obtains its TLS configuration from the system variable:

Details

The wsrep_ssl_mode system variable configures the WSREP TLS Mode. The following WSREP TLS Modes are supported:

When the wsrep_ssl_mode system variable is set to PROVIDER, each node obtains its TLS configuration from the system variable. The following options are used:

When the wsrep_ssl_mode system variable is set to SERVER or SERVER_X509, each node obtains its TLS configuration from the node's MariaDB Enterprise Server configuration. The following system variables are used:

Parameters

Galera Cluster System Tables

Starting with Galera 4 (used in and later), several system tables related to replication are available in the mysql database. These tables can be queried by administrators to get a real-time view of the cluster's layout, membership, and current operations.

You can view these tables with the following query:

mysql vs. mariadb

You'll see queries referencing the mysql database (e.g., FROM mysql.wsrep_cluster). This is intentional. MariaDB, a MySQL fork, retains the mysql name for its internal system schema to ensure historical and backward compatibility where it manages user permissions and system tables.

This is different from the command-line client, which should always be invoked as mariadb.

These tables are managed by the cluster itself and should not be modified by users, with the exception of wsrep_allowlist.

wsrep_allowlist

This table stores a list of allowed IP addresses that can join the cluster and perform a state transfer (IST/SST). It is a security feature to prevent unauthorized nodes from joining.

To add a new node to the allowlist, you can INSERT its IP address:

If a node attempts to join and its IP address is not in the allowlist, the join will fail. The DONOR nodes will log a warning similar to this:

The joining node will fail with a connection timeout error.

wsrep_cluster

This table contains a single row with a high-level view of the cluster's identity, state, and capabilities.

Attribute
Description

You can query its contents like this:

wsrep_cluster_members

This table provides a real-time list of all the nodes that are currently members of the cluster component.

Node
Description

Querying this table gives you a quick overview of the current cluster membership:

wsrep_streaming_log

This table contains metadata for Streaming Replication transactions that are currently in progress. Each row represents a write-set fragment. The table is typically empty unless a large or long-running transaction with streaming enabled is active.

Fragment
Description

Example of querying the table during a streaming transaction:

This page is licensed: CC BY-SA / Gnu FDL

Known Limitations

This article contains information on known problems and limitations of MariaDB Galera Cluster.

Limitations from codership.com:

  • Currently, replication works only with the . Any writes to tables of other types, including system (MySQL) tables are not replicated (this limitation excludes DDL statements such as , which implicitly modify the mysql. tables — those are replicated). There is, however, experimental support for - see the wsrep_replicate_myisam system variable)

  • Unsupported explicit locking include , , (, ,…). Using transactions properly should be able to overcome these limitations. Global locking operators like are supported.

  • All tables should have a primary key (multi-column primary keys are supported). operations are unsupported on tables without a primary key. Also, rows in tables without a primary key may appear in a different order on different nodes.

  • The and the cannot be directed to a table. If you enable these logs, then you must forward the log to a file by setting .

  • Transaction size. While Galera does not explicitly limit the transaction size, a write set is processed as a single memory-resident buffer, and as a result, extremely large transactions (e.g. ) may adversely affect node performance. To avoid that, the and system variables limit transaction rows to 128K and the transaction size to 2Gb by default. If necessary, users may want to increase those limits. Future versions will add support for transaction fragmentation.

Other observations, in no particular order:

  • If you are using for state transfer, and it fails for whatever reason (e.g., you do not have the database account it attempts to connect with, or it does not have the necessary permissions), you will see an SQL SYNTAX error in the server . Don't let it fool you, this is just a fancy way to deliver a message (the pseudo-statement inside the bogus SQL will contain the error message).

  • Do not use transactions of any essential size. Just to insert 100K rows, the server might require an additional 200-300 Mb. In a less fortunate scenario, it can be 1.5 GB for 500K rows, or 3.5 GB for 1M rows. See for some numbers (you'll see that it's closed, but it's not closed because it was fixed).

  • Locking is lax when DDL is involved. For example, if your DML transaction uses a table, and a parallel DDL statement is started, in the normal MySQL setup, it would have waited for the metadata lock, but in the Galera context, it will be executed right away. It happens even if you are running a single node, as long as you have configured it as a cluster node. See also . This behavior might cause various side effects; the consequences have not been investigated yet. Try to avoid such parallelism.

This page is licensed: CC BY-SA / Gnu FDL

SHOW TABLES FROM mysql LIKE 'wsrep%';
+---------------------------+
| Tables_in_mysql (wsrep%)  |
+---------------------------+
| wsrep_allowlist           |
| wsrep_cluster             |
| wsrep_cluster_members     |
| wsrep_streaming_log       |
+---------------------------+

WSREP TLS Mode

Values

Description

Provider

  • PROVIDER

  • TLS is optional for Enterprise Cluster replication traffic.

  • Each node obtains its TLS configuration from the wsrep_provider_options system variable. When the provider is not configured to use TLS on a node, the node will connect to the cluster without TLS.

  • The Provider WSREP TLS Mode is backward compatible with ES 10.5 and earlier. When performing a rolling upgrade from ES 10.5 and earlier, the Provider WSREP TLS Mode can be configured on the upgraded nodes.

Server

  • SERVER

  • TLS is mandatory for Enterprise Cluster replication traffic, but X509 certificate verification is not performed.

  • Each node obtains its TLS configuration from the node's MariaDB Enterprise Server configuration. When MariaDB Enterprise Server is not configured to use TLS on a node, the node will fail to connect to the cluster.

  • The Server WSREP TLS Mode is the default in ES 10.6.

Server X509

  • SERVER_X509

  • TLS and X509 certificate verification are mandatory for Enterprise Cluster replication traffic.

  • Each node obtains its TLS configuration from the node's MariaDB Enterprise Server configuration. When MariaDB Enterprise Server is not configured to use TLS on a node, the node will fail to connect to the cluster.

WSREP Provider Option

Description

socket.ssl

Set this option to true to enable TLS.

socket.ssl_ca

Set this option to the path of the CA chain file.

socket.ssl_cert

Set this option to the path of the node's X509 certificate file.

socket.ssl_key

Set this option to the path of the node's private key file.

System Variable

Description

ssl_ca

Set this system variables to the path of the CA chain file.

ssl_capath

Optionally set this system variables to the path of the CA chain directory. The directory must have been processed by openssl rehash. When your CA chain is stored in a single file, use the ssl_ca system variable instead.

ssl_cert

Set this system variable to the path of the node's X509 certificate file.

ssl_key

Set this system variable to the path of the node's private key file.

Command-line

--wsrep_ssl_mode={PROVIDER|SERVER|SERVER_X509}

Configuration file

Supported

Dynamic

No

Scope

Global

Data Type

ENUM (PROVIDER, SERVER, SERVER_X509)

Product Default Value

SERVER

wsrep_provider_options
wsrep_provider_options
[mariadb]
...
wsrep_ssl_mode = SERVER_X509

ssl_ca = /certs/ca-cert.pem
ssl_cert = /certs/server-cert.pem
ssl_key = /certs/server-key.pem
[mariadb]
...
wsrep_ssl_mode = PROVIDER
wsrep_provider_options = "socket.ssl=true;socket.ssl_cert=/certs/server-cert.pem;socket.ssl_ca=/certs/ca-cert.pem;socket.ssl_key=/certs/server-key.pem"
  • Do not rely on auto-increment values to be sequential. Galera uses a mechanism based on autoincrement increment to produce unique non-conflicting sequences, so on every single node, the sequence will have gaps. See Managing Auto Increments with Multi Masters

  • A command may fail with ER_UNKNOWN_COM_ERROR, producing 'WSREP has not yet prepared node for application use' (or 'Unknown command' in older versions) error message. It happens when a cluster is suspected to be split, and the node is in a smaller part, for example, during a network glitch, when nodes temporarily lose each other. It can also occur during state transfer. The node takes this measure to prevent data inconsistency. It's usually a temporary state; it can be detected by checking the wsrep_ready value. The node, however, allows the SHOW and SET commands during this period.

  • After a temporary split, if the 'good' part of the cluster is still reachable and its state was modified, resynchronization occurs. As a part of it, nodes of the 'bad' part of the cluster drop all client connections. It might be quite unexpected, especially if the client was idle and did not even know anything was happening. Please also note that after the connection to the isolated node is restored, if there is a flow on the node, it takes a long time for it to synchronize, during which the "good" node says that the cluster is already of the normal size and synced, while the rejoining node says it's only joined (but not synced). The connections keep getting 'unknown command'. It should pass eventually.

  • While is checked on startup and can only be ROW (see ), it can be changed at runtime. Do NOT change at runtime, it is likely to cause replication failure, but make all other nodes crash.

  • If you are using rsync for state transfer, and a node crashes before the state transfer is over, the rsync process might hang forever, occupying the port and preventing the node. The problem will show up as 'port in use' in the server error log. Find the orphaned rsync process and kill it manually.

  • Performance: By design performance of the cluster cannot be higher than the performance of the slowest node; however, even if you have only one node, its performance can be considerably lower compared to running the same server in a standalone mode (without wsrep provider). It is particularly true for big enough transactions (even those which are well within current limitations on transaction size quoted above).

  • Windows is not supported.

  • Replication filters: When using a Galera cluster, replication filters should be used with caution. See Configuring MariaDB Galera Cluster: Replication Filters for more details. See also MDEV-421 and MDEV-6229.

  • Flashback isn't supported in Galera due to an incompatible binary log format.

  • FLUSH PRIVILEGES is not replicated.

  • The needed to be disabled by setting prior to MariaDB Galera Cluster 5.5.40, MariaDB Galera Cluster 10.0.14, and

  • In an asynchronous replication setup where a master replicates to a Galera node acting as a slave, parallel replication (slave-parallel-threads > 1) on the slave is currently not supported (see MDEV-6860).

  • The disk-based Galera gcache is not encrypted (MDEV-8072).

  • Nodes may have different table definitions, especially temporarily during rolling schema upgrade operations, but the same apply as they do for row-based replication

  • wsrep_max_ws_rows
    wsrep_max_ws_size
    MDEV-466
    MDEV-468

    cluster_uuid

    The unique identifier for the cluster.

    view_id

    Corresponds to the wsrep_cluster_conf_id status variable, representing the current membership view ID.

    view_seqno

    The global transaction sequence number associated with this cluster view.

    protocol_version

    The wsrep protocol version in use.

    capabilities

    A bitmask of capabilities provided by the Galera library.

    node_uuid

    The unique identifier for each individual node.

    cluster_uuid

    The UUID of the cluster this node belongs to.

    node_name

    The human-readable name of the node, set by the wsrep_node_name parameter.

    node_incoming_address

    The IP address and port where the node is listening for client connections.

    node_uuid

    The UUID of the node where the streaming transaction originated.

    trx_id

    The transaction identifier.

    seqno

    The sequence number of the specific write-set fragment.

    flags

    Flags associated with the fragment.

    frag

    The binary log events contained in the fragment.

    MariaDB [mysql]> DESCRIBE wsrep_allowlist;
    +-------+----------+------+-----+---------+-------+
    | Field | Type     | Null | Key | Default | Extra |
    +-------+----------+------+-----+---------+-------+
    | ip    | char(64) | NO   | PRI | NULL    |       |
    +-------+----------+------+-----+---------+-------+
    INSERT INTO mysql.wsrep_allowlist(ip) VALUES('18.193.102.155');
    [Warning] WSREP: Connection not allowed, IP 3.70.155.51 not found in allowlist.
    SELECT * FROM mysql.wsrep_cluster\G
    *************************** 1. row ***************************
       cluster_uuid: bd5fe1c3-7d80-11e9-8913-4f209d688a15
            view_id: 3
         view_seqno: 2956
    protocol_version: 4
       capabilities: 184703
    SELECT * FROM mysql.wsrep_cluster_members ORDER BY node_name\G
    *************************** 1. row ***************************
               node_uuid: e39d1774-7e2b-11e9-b5b2-7696f81d30fb
            cluster_uuid: bd5fe1c3-7d80-11e9-8913-4f209d688a15
               node_name: galera1
    node_incoming_address: AUTO
    *************************** 2. row ***************************
               node_uuid: eb8fc512-7e2b-11e9-bb74-3281cf207f60
            cluster_uuid: bd5fe1c3-7d80-11e9-8913-4f209d688a15
               node_name: galera2
    node_incoming_address: AUTO
    *************************** 3. row ***************************
               node_uuid: 2347a8ac-7e2c-11e9-b6f0-da90a2d0a563
            cluster_uuid: bd5fe1c3-7d80-11e9-8913-4f209d688a15
               node_name: galera3
    node_incoming_address: AUTO
    -- Enable streaming for the session
    SET SESSION wsrep_trx_fragment_unit='statements';
    SET SESSION wsrep_trx_fragment_size=1;
    -- Start a transaction
    START TRANSACTION;
    INSERT INTO my_table VALUES (100);
    -- Query the log table in the same session
    SELECT node_uuid, trx_id, seqno, flags
    FROM mysql.wsrep_streaming_log;
    +--------------------------------------+--------+-------+-------+
    | node_uuid                            | trx_id | seqno | flags |
    +--------------------------------------+--------+-------+-------+
    | a006244a-7ed8-11e9-bf00-867215999c7c |     26 |     4 |     1 |
    +--------------------------------------+--------+-------+-------+

    Galera Cluster System Variables

    This page documents system variables related to Galera Cluster. For options that are not system variables, see . See for a complete list of system variables and instructions on setting them. Also see the .

    wsrep_allowlist

    • Description:

      • Allowed IP addresses, comma-delimited.

      • Note that setting gmcast.listen_addr=tcp://[::]:4567 on a dual-stack system (for instance, Linux with net.ipv6.bindv6only = 0), IPv4 addresses need to be allow-listed using the IPv4-mapped IPv6 address (eg. ::ffff:1.2.3.4).

    • Command line: --wsrep-allowlist=value1[,value2...]

    • Scope: Global

    • Dynamic: No

    • Data Type: String

    • Default Value: None

    • Introduced:

    wsrep_applier_retry_count

    • Description: Maximum number of applier retry attempts. Previously, replication applying always stopped for the first non-ignored failure occurring in event applying, and the node emergency-aborts (or start inconsistency voting). Some failures, however, can be concurrency related, and applying may succeed if the operation is tried at later time. This variable controls the retry-applying feature. It is set to 0 by default, which means no retrying.

    • Command line: --wsrep-applier-retry-count=value

    • Scope: Global

    wsrep_auto_increment_control

    • Description: If set to 1 (the default), automatically adjusts the and variables according to the size of the cluster, and readjusts them when the cluster size changes. This avoids replication conflicts due to . In a primary-replica environment, can be set to OFF.

    • Command line: --wsrep-auto-increment-control[={0|1}]

    • Scope: Global

    wsrep_causal_reads

    • Description: If set to ON (OFF is default), enforces characteristics across the cluster. In the case that a primary applies an event more quickly than a replica, the two could briefly be out-of-sync. With this variable set to ON, the replica will wait for the event to be applied before processing further queries. Setting to ON also results in larger read latencies. Deprecated by .

    • Command line: --wsrep-causal-reads[={0|1}]

    wsrep_certificate_expiration_hours_warning

    This variable is documented in detail here:

    wsrep_certification_rules

    • Description: Certification rules to use in the cluster. Possible values are:

      • strict: Stricter rules that could result in more certification failures. For example with foreign keys, certification failure could result if different nodes receive non-conflicting insertions at about the same time that point to the same row in a parent table.

      • optimized: Relaxed rules that allow more concurrency and cause less certification failures.

    wsrep_certify_nonPK

    • Description: When set to ON (the default), Galera still certifies transactions for tables with no . However, this can still cause undefined behavior in some circumstances. It is recommended to define primary keys for every InnoDB table when using Galera.

    • Command line: --wsrep-certify-nonPK[={0|1}]

    • Scope: Global

    wsrep_cluster_address

    • Description: The addresses of cluster nodes to connect to when starting up.

      • Good practice is to specify all possible cluster nodes, in the form gcomm://<node1 or ip:port>,<node2 or ip2:port>,<node3 or ip3:port>.

      • Specifying an empty ip (gcomm://) will cause the node to start a new cluster (which should not be done in the my.cnf file, as after each restart the server will not rejoin the current cluster).

    wsrep_cluster_name

    • Description: The name of the cluster. Nodes cannot connect to clusters with a different name, so needs to be identical on all nodes in the same cluster. The variable can be set dynamically, but note that doing so may be unsafe and cause an outage, and that the wsrep provider is unloaded and loaded.

    • Command line: --wsrep-cluster-name=value

    • Scope: Global

    • Dynamic: Yes

    wsrep_convert_LOCK_to_trx

    • Description: Converts / statements to and . Used mainly for getting older applications to work with a multi-primary setup, use carefully, as can result in extremely large writesets.

    • Command line: --wsrep-convert-LOCK-to-trx[={0|1}]

    • Scope: Global

    • Dynamic: Yes

    wsrep_data_home_dir

    • Description: Directory where wsrep provider will store its internal files.

    • Command line: --wsrep-data-home-dir=value

    • Scope: Global

    • Dynamic: No

    wsrep_dbug_option

    • Description: Unused. The mechanism to pass the DBUG options to the wsrep provider hasn't been implemented.

    • Command line: --wsrep-dbug-option=value

    • Scope: Global

    • Dynamic: Yes

    wsrep_debug

    • Description: WSREP debug level logging.

      • Before MariaDB 10.6.1, DDL logging was only logged on the originating node. From , it is logged on other nodes as well.

      • Data type is . Valid values are:

        • 0: NONE

    wsrep_desync

    • Description: When a node receives more write-sets than it can apply, the transactions are placed in a received queue. If the node's received queue has too many write-sets waiting to be applied (as defined by the WSREP provider option), then the node would usually engage Flow Control. However, when this option is set to ON, Flow Control will be disabled for the desynced node. The desynced node works through the received queue until it reaches a more manageable size. The desynced node continues to receive write-sets from the other nodes in the cluster. The other nodes in the cluster do not wait for the desynced node to catch up, so the desynced node can fall even further behind the other nodes in the cluster. You can check if a node is desynced by checking if the status variable is equal to Donor/Desynced.

    • Command line: --wsrep-desync[={0|1}]

    wsrep_dirty_reads

    • Description: By default, when not synchronized with the group (=OFF), a node rejects all queries other than SET and SHOW. If wsrep_dirty_reads is set to 1, queries which do not change data, like SELECT queries (dirty reads), creating of prepare statement, and so forth will be accepted by the node.

    • Command line: --wsrep-dirty-reads[={0|1}]

    wsrep_drupal_282555_workaround

    • Description: If set to ON, a workaround for is enabled. This is a bug where, in some cases, when inserting a DEFAULT value into an column, a duplicate key error may be returned.

    • Command line: --wsrep-drupal-282555-workaround[={0|1}]

    • Scope: Global

    wsrep_forced_binlog_format

    • Description: A that overrides any session binlog format settings.

    • Command line: --wsrep-forced-binlog-format=value

    • Scope: Global

    • Dynamic: Yes

    wsrep_gtid_domain_id

    • Description: This system variable defines the domain ID that is used for .

      • When is set to ON, wsrep_gtid_domain_id is used in place of for all Galera Cluster write sets.

      • When is set to OFF, wsrep_gtid_domain_id

    wsrep_gtid_mode

    • Description: attempts to keep consistent for Galera Cluster write sets on all cluster nodes. state is initially copied to a joiner node during an . If you are planning to use Galera Cluster with , then wsrep GTID mode can be helpful.

      • When wsrep_gtid_mode is set to ON, is used in place of for all Galera Cluster write sets.

      • When wsrep_gtid_mode

    wsrep_gtid_seq_no

    • Description: Internal server usage, manually set WSREP GTID seqno.

    • Command line: None

    • Scope: Session only

    • Dynamic: Yes

    wsrep_ignore_apply_errors

    • Description: Bitmask determining whether errors are ignored, or reported back to the provider.

      • 0: No errors are skipped.

      • 1: Ignore some DDL errors (DROP DATABASE, DROP TABLE, DROP INDEX, ALTER TABLE).

    wsrep_load_data_splitting

    • Description: If set to ON, supports big data files by introducing transaction splitting. The setting has been deprecated in Galera 4, and defaults to OFF

    • Command line: --wsrep-load-data-splitting[={0|1}]

    • Scope: Global

    wsrep_log_conflicts

    • Description: If set to ON (OFF is default), details of conflicting MDL as well as InnoDB locks in the cluster will be logged.

    • Command line: --wsrep-log-conflicts[={0|1}]

    • Scope: Global

    wsrep_max_ws_rows

    • Description: Maximum permitted number of rows per write set. The support for this variable has been added and in order to be backward compatible. The default value has been changed to 0, which essentially allows write sets to be any size.

    • Command line: --wsrep-max-ws-rows=#

    • Scope: Global

    wsrep_max_ws_size

    • Description: Maximum permitted size in bytes per write set. Write sets exceeding 2GB are rejected.

    • Command line: --wsrep-max-ws-size=#

    • Scope: Global

    • Dynamic: Yes

    wsrep_mode

    • Description: Turns on WSREP features which are not part of the default behavior.

      • BINLOG_ROW_FORMAT_ONLY: Only ROW is supported.

      • DISALLOW_LOCAL_GTID: Nodes can have GTIDs for local transactions in a number of scenarios. If

    wsrep_mysql_replication_bundle

    • Description: Determines the number of replication events that are grouped together. Experimental implementation aimed to assist with bottlenecks when a single replica faces a large commit time delay. If set to 0 (the default), there is no grouping.

    • Command line: --wsrep-mysql-replication-bundle=#

    • Scope: Global

    wsrep_node_address

    • Description: Specifies the node's network address, in the format ip address[:port]. It supports IPv6. The default behavior is for the node to pull the address of the first network interface on the system and the default Galera port. This automatic guessing can be unreliable, particularly in the following cases:

      • Cloud deployments

      • Container deployments

    wsrep_node_incoming_address

    • Description: This is the address from which the node listens for client connections. If an address is not specified or it's set to AUTO (default), mysqld uses either or , or tries to get one from the list of available network interfaces, in the same order. See also .

    • Command line: --wsrep-node-incoming-address=value

    • Scope: Global

    wsrep_node_name

    • Description: Name of this node. This name can be used in as a preferred donor. Note that multiple nodes in a cluster can have the same name.

    • Command line: --wsrep-node-name=value

    • Scope: Global

    • Dynamic: Yes

    wsrep_notify_cmd

    • Description: Command to be executed each time the node state or the cluster membership changes. Can be used for raising an alarm, configuring load balancers and so on. See the for more details.

    • Command line: --wsrep-notify-command=value

    • Scope: Global

    • Dynamic: No

    wsrep_on

    • Description: Whether or not wsrep replication is enabled. If the global value is set to OFF , it is not possible to load the provider and join the node in the cluster. If only the session value is set to OFF, the operations from that particular session are not replicated in the cluster, but other sessions and applier threads will continue as normal. The session value of the variable does not affect the node's membership and thus, regardless of its value, the node keeps receiving updates from other nodes in the cluster. It is set to OFF by default and must be turned on to enable Galera replication.

    • Command line: --wsrep-on[={0|1}]

    wsrep_OSU_method

    • Description: Online schema upgrade method. The default is TOI, specifying the setting without the optional parameter will set to RSU.

      • TOI: Total Order Isolation. In each cluster node, DDL is processed in the same order regarding other transactions, guaranteeing data consistency. However, affected parts of the database will be locked for the whole cluster.

      • RSU

    wsrep_patch_version

    • Description: Wsrep patch version, for example wsrep_25.10.

    • Command line: None

    • Scope: Global

    • Dynamic: No

    wsrep_provider

    • Description: Location of the wsrep library, usually /usr/lib/libgalera_smm.so on Debian and Ubuntu, and /usr/lib64/libgalera_smm.so on Red Hat/CentOS.

    • Command line: --wsrep-provider=value

    • Scope: Global

    wsrep_provider_options

    • Description: Semicolon (;) separated list of wsrep options (see ).

    • Command line: --wsrep-provider-options=value

    • Scope: Global

    More details can be found on this page:

    wsrep_recover

    • Description: If set to ON when the server starts, the server will recover the sequence number of the most recent write set applied by Galera, and it will be output to stderr, which is usually redirected to the . At that point, the server will exit. This sequence number can be provided to the system variable.

    • Command line: --wsrep-recover[={0|1}]

    • Scope: Global

    wsrep_reject_queries

    • Description: Variable to set to reject queries from client connections, useful for maintenance. The node continues to apply write-sets, but an Error 1047: Unknown command error is generated by a client query.

      • NONE - Not set. Queries are processed as normal.

      • ALL - All queries from client connections will be rejected, but existing client connections are maintained.

    wsrep_replicate_myisam

    • Description: Whether or not DML updates for tables will be replicated. This functionality is still experimental and should not be relied upon in production systems. Deprecated in , and removed in , use instead.

    • Command line: --wsrep-replicate-myisam[={0|1}]

    • Scope: Global

    wsrep_restart_slave

    • Description: If set to ON, the replica is restarted automatically, when node joins back to cluster.

    • Command line: --wsrep-restart-slave[={0|1}]

    • Scope: Global

    • Dynamic: Yes

    wsrep_retry_autocommit

    • Description: Number of times autocommited queries are retried due to cluster-wide conflicts before returning an error to the client. If set to 0, no retries are attempted, while a value of 1 (the default) or more specifies the number of retries attempted. Can be useful to assist applications using autocommit to avoid deadlocks. Reasons for failures include:

      • Certification failure: If the transaction reached the replication state and observed the conflict by performing a certification test.

      • High-priority abort: If the execution of the transaction was interrupted by the replication applier before entering the replication state.

    wsrep_slave_FK_checks

    • Description: If set to ON (the default), the applier replica thread performs foreign key constraint checks.

    • Command line: --wsrep-slave-FK-checks[={0|1}]

    • Scope: Global

    • Dynamic: Yes

    wsrep_slave_threads

    • Description: Number of replica threads used to apply Galera write sets in parallel. The Galera replica threads are able to determine which write sets are safe to apply in parallel. However, if your cluster nodes seem to have frequent consistency problems, then setting the value to 1 will probably fix the problem. See for more information.

    • Command line: --wsrep-slave-threads=#

    • Scope: Global

    wsrep_slave_UK_checks

    • Description: If set to ON, the applier replica thread performs secondary index uniqueness checks.

    • Command line: --wsrep-slave-UK-checks[={0|1}]

    • Scope: Global

    • Dynamic: Yes

    wsrep_sr_store

    • Description: Storage for streaming replication fragments.

    • Command line: --wsrep-sr-store=val

    • Scope: Global

    • Dynamic: No

    wsrep_ssl_mode

    This variable is documented in details on this page:

    wsrep_sst_auth

    • Description: Username and password of the user to use for replication. Unused if is set to rsync, while for other methods it should be in the format <user>:<password>. The contents are masked in logs and when querying the value with . See for more information.

    • Command line: --wsrep-sst-auth=value

    • Scope: Global

    wsrep_sst_donor

    • Description: Comma-separated list (from 5.5.33) or name (as per ) of the servers as donors, or the source of the state transfer, in order of preference. The donor-selection algorithm, in general, prefers a donor capable of transferring only the missing transactions (IST) to the joiner node, instead of the complete state (SST). Thus, it starts by looking for an IST-capable node in the given donor list followed by rest of the nodes in the cluster. In case multiple candidate nodes are found outside the specified donor list, the node in the same segment () as the joiner is preferred. If none of the existing nodes in the cluster can serve the missing transactions through IST, the algorithm moves on to look for a suitable node to transfer the entire state (SST). It first looks at the nodes specified in the donor list (irrespective of their segment). If no suitable donor is still found, the rest of the donor nodes are checked for suitability only if the donor list has a "terminating-comma". Note that a stateless node (the Galera arbitrator) can never be a donor. See for more information.

    Although the variable is dynamic, the node does not use the new value unless the node requiring SST or IST disconnects from the cluster. To force this, set to an empty string and back to the nodes list. After setting this variable dynamically, on startup the value from the configuration file will be used again.

    • Command line: --wsrep-sst-donor=value

    • Scope: Global

    • Dynamic: Yes (read note above)

    • Data Type: String

    wsrep_sst_donor_rejects_queries

    • Description: If set to ON (OFF is default), the donor node will reject incoming queries, returning an UNKNOWN COMMAND error code. Can be used for informing load balancers that a node is unavailable.

    • Command line: --wsrep-sst-donor-rejects-queries[={0|1}]

    • Scope: Global

    wsrep_sst_method

    • Description: Method used for taking the . See for more information.

    • Command line: --wsrep-sst-method=value

    • Scope: Global

    • Dynamic: Yes

    See this page for more information about this variable:

    wsrep_sst_receive_address

    • Description: This is the address where other nodes (donor) in the cluster connect to in order to send the state-transfer updates. If an address is not specified or its set to AUTO (default), mysqld uses 's value as the receiving address. However, if is not set, it uses address from either or tries to get one from the list of available network interfaces, in the same order. Note: setting it to localhost will make it impossible for nodes running on other hosts to reach this node. See for more information.

    • Command line: --wsrep-sst-receive-address=value

    wsrep_start_position

    • Description: The start position that the node should use in the format: UUID:seq_no. The proper value to use for this position can be recovered with .

    • Command line: --wsrep-start-position=value

    • Scope: Global

    wsrep_status_file

    • Description: wsrep status output filename.

    • Command line: --wsrep-status-file=value

    • Scope: Global

    • Dynamic: No

    wsrep_strict_ddl

    • Description: If set, reject DDL statements on affected tables not supporting Galera replication. This is done by checking if the table is InnoDB, which is the only table currently fully supporting Galera replication. MyISAM tables will not trigger the error if the experimental setting is ON. If set, should be set on all tables in the cluster. Affected DDL statements include: (e.g. CREATE TABLE t1(a int) engine=Aria) Statements in , , and are permitted as the affected tables are only known at execution. Furthermore, the various USER, ROLE, SERVER and DATABASE statements are also allowed as they do not have an affected table. Deprecated in and removed in . Use instead.

    • Command line: --wsrep-strict-ddl[={0|1}

    wsrep_sync_wait

    • Description: Setting this variable ensures causality checks will take place before executing an operation of the type specified by the value, ensuring that the statement is executed on a fully synced node. While the check is taking place, new queries are blocked on the node to allow the server to catch up with all updates made in the cluster up to the point where the check was begun. Once reached, the original query is executed on the node. This can result in higher latency. Note that when is ON, values of wsrep_sync_wait become irrelevant. Sample usage (for a critical read that must have the most up-to-date data) SET SESSION wsrep_sync_wait=1; SELECT ...; SET SESSION wsrep_sync_wait=0;

      • 0 - Disabled (default)

    wsrep_trx_fragment_size

    • Description: Size of transaction fragments for streaming replication (measured in units as specified by )

    • Command line: --wsrep-trx-fragment-size=#

    • Scope: Session

    • Dynamic: Yes

    wsrep_trx_fragment_unit

    • Description: Unit for streaming replication transaction fragments' size:

      • bytes: transaction’s binlog events buffer size in bytes

      • rows: number of rows affected by the transaction

    This page is licensed: CC BY-SA / Gnu FDL

    Dynamic: Yes

  • Data Type: INT UNSIGNED

  • Default Value: 0

  • Range: 0 to 4294967295

  • Introduced:

  • Dynamic: Yes

  • Data Type: Boolean

  • Default Value: ON

  • Scope: Session

  • Dynamic: Yes

  • Data Type: Boolean

  • Default Value: OFF

  • Removed:

  • Command line: --wsrep-certifcation-rules

  • Scope: Global

  • Dynamic: Yes

  • Data Type: Enumeration

  • Default Value: strict

  • Valid Values: strict, optimized

  • Dynamic: Yes
  • Data Type: Boolean

  • Default Value: ON

  • The variable can be changed at runtime in some configurations, and will result in the node closing the connection to any current cluster, and connecting to the new address.

  • If specifying a port, note that this is the Galera port, not the MariaDB port.

  • For example:

    • gcomm://192.168.0.1,192.168.0.2,192.168.0.3

    • gcomm://192.168.0.1:1234,192.168.0.2:1234,192.168.0.3:1234?gmcast.listen_addr=tcp://0.0.0.0:1234

  • See also gmcast.listen_addr

  • Command line: --wsrep-cluster-address=value

  • Scope: Global

  • Dynamic: No

  • Data Type: String

  • Data Type: String

  • Default Value: my_wsrep_cluster

  • Data Type: Boolean

  • Default Value: OFF

  • Data Type: String

  • Default Value: The variable value.

  • Data Type: String

    : Off (default).
  • 1: SERVER: MariaDB server code contains WSREP_DEBUG log writes, and these are added to server error log.

  • 2: TRANSACTION: Logging from wsrep-lib transaction is added to the error log.

  • 3: STREAMING: Logging from streaming transactions in wsrep-lib is added to the error log.

  • 4: CLIENT: Logging from wsrep-lib client state is added to the error log.

  • Command line: --wsrep-debug[={NONE|SERVER|TRANSACTION|STREAMING|CLIENT}]

  • Scope: Global

  • Dynamic: Yes

  • Data Type: Enumeration

  • Default Value: NONE

  • Valid Values: NONE, SERVER, TRANSACTION, STREAMING, CLIENT

  • Scope: Global

  • Dynamic: Yes

  • Data Type: Boolean

  • Default Value: OFF

  • Scope: Global,Session

  • Dynamic: Yes

  • Data Type: Boolean

  • Default Value: OFF

  • Valid Values: ON, OFF

  • Dynamic: Yes

  • Data Type: Boolean

  • Default Value: OFF

  • Default Value: NONE

  • Data Type: Enum

  • Valid Values: STATEMENT, ROW, MIXED or NONE (which resets the forced binlog format state).

  • is simply ignored to allow for backward compatibility.
  • There are some additional requirements that need to be met in order for this mode to generate consistent . For more information, see Using MariaDB GTIDs with MariaDB Galera Cluster.

  • Command line: --wsrep-gtid-domain-id=#

  • Scope: Global

  • Dynamic: Yes

  • Data Type: numeric

  • Default Value: 0

  • Range: 0 to 4294967295

  • is set to
    OFF
    ,
    is simply ignored to allow for backward compatibility.
  • There are some additional requirements that need to be met in order for this mode to generate consistent . For more information, see Using MariaDB GTIDs with MariaDB Galera Cluster.

  • Command line: --wsrep-gtid-mode[={0|1}]

  • Scope: Global

  • Dynamic: Yes

  • Data Type: boolean

  • Default Value: OFF

  • Data Type: numeric

  • Range: 0 to 18446744073709551615

  • Introduced:

  • 2: Skip DML errors (Only ignores DELETE errors).

  • 4: Ignore all DDL errors.

  • Command line: --wsrep-ignore-apply-errors

  • Scope: Global

  • Dynamic: Yes

  • Data Type: Numeric

  • Default Value: 7

  • Range: 0 to 7

  • Dynamic: Yes

  • Data Type: Boolean

  • Default Value: OFF

  • Deprecated: MariaDB 10.4.2

  • Removed:

  • Dynamic: Yes
  • Data Type: Boolean

  • Default Value: OFF

  • Dynamic: Yes
  • Data Type: Numeric

  • Default Value: 0

  • Range: 0 to 1048576

  • Data Type: Numeric

  • Default Value: 2147483647 (2GB)

  • Range: 1024 to 2147483647

  • DISALLOW_LOCAL_GTID
    is set, these operations produce an error
    ERROR HY000: Galera replication not supported
    . Scenarios include:
    • A DDL statement is executed with wsrep_OSU_method=RSU set.

    • A DML statement writes to a non-InnoDB table.

    • A DML statement writes to an InnoDB table with wsrep_on=OFF set.

  • REPLICATE_ARIA: Whether or not DML updates for tables will be replicated. This functionality is experimental and should not be relied upon in production systems.

  • REPLICATE_MYISAM: Whether or not DML updates for a tables will be replicated. This functionality is experimental and should not be relied upon in production systems.

  • REQUIRED_PRIMARY_KEY: Table should have PRIMARY KEY defined.

  • STRICT_REPLICATION: Same as the old wsrep_strict_ddl setting.

  • SKIP_APPLIER_FK_CHECKS_IN_IST: When this operation mode is set, and the node is processing IST or catch-up, appliers skip FK checking. See this page for details. This flag is available from MariaDB 12.0.

  • Command line: --wsrep-mode=value

  • Scope: Global

  • Dynamic: Yes

  • Data Type: Enumeration

  • Default Value: (Empty)

  • Valid Values: SKIP_APPLIER_FK_CHECKS_IN_IST, BINLOG_ROW_FORMAT_ONLY, DISALLOW_LOCAL_GTID, REQUIRED_PRIMARY_KEY, REPLICATE_ARIA, REPLICATE_MYISAM and STRICT_REPLICATION

  • Introduced:

  • Dynamic: No
  • Data Type: Numeric

  • Default Value: 0

  • Range: 0 to 1000

  • Servers with multiple network interfaces
  • Servers running multiple nodes

  • Network address translation (NAT)

  • Clusters with nodes in more than one region

  • See also wsrep_provider_options -> gmcast.listen_addr

  • Command line: --wsrep-node-address=value

  • Scope: Global

  • Dynamic: No

  • Data Type: String

  • Default Value: Primary network address, usually eth0 with a default port of 4567, or 0.0.0.0 if no IP address.

  • Dynamic: No

  • Data Type: String

  • Default Value: AUTO

  • Data Type: String

  • Default Value: The server's hostname.

  • Data Type: String

  • Default Value: Empty

  • Scope: Global, Session

  • Dynamic: Yes

  • Data Type: Boolean

  • Default Value: OFF

  • Valid Values: ON, OFF

  • : Rolling Schema Upgrade. DDL processing is only done locally on the node, and the user needs perform the changes manually on each node. The node is desynced from the rest of the cluster while the processing takes place to avoid the blocking other nodes. Schema changes
    to avoid breaking replication when the DDL processing is complete on the single node, and replication recommences.
  • Command line: --wsrep-OSU-method[=value]

  • Scope: Global, Session

  • Dynamic: Yes

  • Data Type: Enum

  • Default Value: TOI

  • Valid Values: TOI, RSU

  • Data Type: String

  • Default Value: None

  • Data Type: String
  • Default Value: None

  • Dynamic: No
  • Data Type: String

  • Default Value: Empty

  • Dynamic: No

  • Data Type: Boolean

  • Default Value: OFF

  • ALL_KILL All queries from client connections will be rejected, and existing client connections, including the current one, are immediately killed.

  • Command line: --wsrep-reject-queries[=value]

  • Scope: Global

  • Dynamic: Yes

  • Data Type: Enum

  • Default Value: NONE

  • Valid Values: NONE, ALL, ALL_KILL

  • Dynamic: Yes
  • Default Value: OFF

  • Data Type: Boolean

  • Valid Values: ON, OFF

  • Deprecated:

  • Removed:

  • Default Value: OFF

  • Data Type: Boolean

  • Command line: --wsrep-retry-autocommit=value

  • Scope: Global

  • Dynamic: No

  • Data Type: Numeric

  • Default Value: 1

  • Range: 0 to 10000

  • Data Type: Boolean

  • Default Value: ON

  • Dynamic: Yes

  • Data Type: Numeric

  • Default Value: 1

  • Range: 1 to 512

  • Data Type: Boolean

  • Default Value: OFF

  • Data Type: Enum

  • Default Value: table

  • Valid Values: table, none

  • Dynamic: Yes

  • Data Type: String

  • Default Value: (Empty)

  • Default Value:

    Dynamic: Yes

  • Data Type: Boolean

  • Default Value: OFF

  • Data Type: String

  • Default Value: rsync

  • Valid Values: rsync, mysqldump, xtrabackup, xtrabackup-v2, mariadb-backup

  • Scope: Global
  • Dynamic: Yes

  • Data Type: String

  • Default Value: AUTO

  • Dynamic: Yes
  • Data Type: String

  • Default Value: 00000000-0000-0000-0000-000000000000:-1

  • Data Type: String

  • Default Value: None

  • Introduced:

  • Scope: Global

  • Dynamic: Yes

  • Data Type: boolean

  • Default Value: OFF

  • Introduced:

  • Deprecated:

  • Removed:

  • 1 - READ (SELECT and BEGIN/START TRANSACTION). This is the same as wsrep_causal_reads=1.
  • 2 - UPDATE and DELETE;

  • 3 - READ, UPDATE and DELETE;

  • 4 - INSERT and REPLACE;

  • 5 - READ, INSERT and REPLACE;

  • 6 - UPDATE, DELETE, INSERT and REPLACE;

  • 7 - READ, UPDATE, DELETE, INSERT and REPLACE;

  • 8 - SHOW

  • 9 - READ and SHOW

  • 10 - UPDATE, DELETE and SHOW

  • 11 - READ, UPDATE, DELETE and SHOW

  • 12 - INSERT, REPLACE and SHOW

  • 13 - READ, INSERT, REPLACE and SHOW

  • 14 - UPDATE, DELETE, INSERT, REPLACE and SHOW

  • 15 - READ, UPDATE, DELETE, INSERT, REPLACE and SHOW

  • Command line: --wsrep-sync-wait=#

  • Scope: Session

  • Dynamic: Yes

  • Data Type: Numeric

  • Default Value: 0

  • Range:

    • 0 to 15

  • Data Type: numeric

  • Default Value: 0

  • Range: 0 to 2147483647

  • statements: number of SQL statements executed in the multi-statement transaction
  • Command line: --wsrep-trx-fragment-unit=value

  • Scope: Session

  • Dynamic: Yes

  • Data Type: enum

  • Default Value: bytes

  • Valid Values: bytes, rows or statements

  • wsrep_sync_wait=1
    wsrep_certificate_expiration_hours_warning
    wsrep_cluster_name
    gcs.fc_limit
    wsrep_local_state_comment
    wsrep_ready
    Drupal/MySQL/InnoDB bug #282555
    wsrep GTID mode
    wsrep_gtid_mode
    wsrep_gtid_mode
    Wsrep GTID mode
    SST
    wsrep_gtid_domain_id
    --wsrep-node-address
    wsrep_provider_options -> gmcast.listen_addr
    wsrep_sst_donor
    Codership Notification Script page
    wsrep_provider_options
    wsrep_provider_options
    wsrep_start_position
    wsrep_mode
    About Galera Replication: Galera Replica Threads
    wsrep_ssl_mode
    wsrep_sst_method
    Introduction to State Snapshot Transfers (SSTs)
    wsrep_node_name
    gmcast.segment
    Introduction to State Snapshot Transfers (SSTs)
    wsrep_cluster_address
    state snapshot transfer (SST)
    Introduction to State Snapshot Transfers (SSTs): SST Methods
    wsrep_sst_method
    --wsrep_node_address
    --wsrep_node_address
    Introduction to State Snapshot Transfers (SSTs)
    wsrep_recover
    wsrep_replicate_myisam
    TRUNCATE TABLE
    DROP INDEX
    wsrep_mode=STRICT_REPLICATION
    wsrep_dirty_reads
    wsrep_trx_fragment_unit
    wsrep_gtid_domain_id

    wsrep_provider_options

    The following options can be set as part of the Galera wsrep_provider_options variable. Dynamic options can be changed while the server is running.

    Options need to be provided as a semicolon (;) separated list on a single line. Options that are not explicitly set are set to their default value.

    Note that before Galera 3, the repl tag was named replicator.

    base_dir

    • Description: Specifies the data directory

    base_host

    • Description: For internal use. Should not be manually set.

    • Default: 127.0.0.1 (detected network address)

    base_port

    • Description: For internal use. Should not be manually set.

    • Default: 4567

    cert.log_conflicts

    • Description: Certification failure log details.

    • Dynamic: Yes

    • Default: no

    cert.optimistic_pa

    • Description: Controls parallel application of actions on the replica. If set, the full range of parallelization as determined by the certification algorithm is permitted. If not set, the parallel applying window will not exceed that seen on the primary, and applying will start no sooner than after all actions it has seen on the master are committed.

    • Dynamic: Yes

    • Default: yes

    debug

    • Description: Enable debugging.

    • Dynamic: Yes

    • Default: no

    evs.auto_evict

    • Description: Number of entries the node permits for a given delayed node before triggering the Auto Eviction protocol. An entry is added to a delayed list for each delayed response from a node. If set to 0, the default, the Auto Eviction protocol is disabled for this node. See for more.

    • Dynamic: No

    • Default: 0

    evs.causal_keepalive_period

    • Description: Used by the developers only, and not manually serviceable.

    • Dynamic: No

    • Default: The .

    evs.debug_log_mask

    • Description: Controls EVS debug logging. Only effective when is on.

    • Dynamic: Yes

    • Default: 0x1

    evs.delay_margin

    • Description: Time that response times can be delayed before this node adds an entry to the delayed list. See . Must be set to a higher value than the round-trip delay time between nodes.

    • Dynamic: No

    • Default: PT1S

    evs.delayed_keep_period

    • Description: Time that this node requires a previously delayed node to remain responsive before being removed from the delayed list. See .

    • Dynamic: No

    • Default: PT30S

    evs.evict

    • Description: When set to the gcomm UUID of a node, that node is evicted from the cluster. When set to an empty string, the eviction list is cleared on the node where it is set. See .

    • Dynamic: No

    • Default: Empty string

    evs.inactive_check_period

    • Description: Frequency of checks for peer inactivity (looking for nodes with delayed responses), after which nodes may be added to the delayed list, and later evicted.

    • Dynamic: No

    • Default: PT0.5S

    evs.inactive_timeout

    • Description: Time limit that a node can be inactive before being pronounced as dead.

    • Dynamic: No

    • Default: PT15S

    evs.info_log_mask

    • Description: Controls extra EVS info logging. Bits:

      • 0x1 – extra view change information

      • 0x2 – extra state change information

      • 0x4 – statistics

    evs.install_timeout

    • Description: Timeout on waits for install message acknowledgments. Replaces evs.consensus_timeout.

    • Dynamic: Yes

    • Default: PT7.5S

    evs.join_retrans_period

    • Description: Time period for how often retransmission of EVS join messages when forming cluster membership should occur.

    • Dynamic: Yes

    • Default: PT1S

    evs.keepalive_period

    • Description: How often keepalive signals should be transmitted when there's no other traffic.

    • Dynamic: Yes

    • Default: PT1S

    evs.max_install_timeouts

    • Description: Number of membership install rounds to attempt before timing out. The total rounds will be this value plus two.

    • Dynamic: No

    • Default: 3

    evs.send_window

    • Description: Maximum number of packets that can be replicated at a time, Must be more than , which applies to data packets only (double is recommended). In WAN environments can be set much higher than the default, for example 512.

    • Dynamic: Yes

    • Default: 4

    evs.stats_report_period

    • Description: Reporting period for EVS statistics.

    • Dynamic: No

    • Default: PT1M

    evs.suspect_timeout

    • Description: A node will be suspected to be dead after this period of inactivity. If all nodes agree, the node is dropped from the cluster before is reached.

    • Dynamic: No

    • Default: PT5S

    evs.use_aggregate

    • Description: If set to true (the default), small packets will be aggregated into one where possible.

    • Dynamic: No

    • Default: true

    evs.user_send_window

    • Description: Maximum number of data packets that can be replicated at a time. Must be smaller than (half is recommended). In WAN environments can be set much higher than the default, for example 512.

    • Dynamic: Yes

    • Default: 2

    evs.version

    • Description: EVS protocol version. Defaults to 0 for backward compatibility. Certain EVS features (e.g. auto eviction) require more recent versions.

    • Dynamic: No

    • Default: 0

    evs.view_forget_timeout

    • Description: Time after which past views will be dropped from the view history.

    • Dynamic: No

    • Default: P1D

    gcache.dir

    • Description: Directory where GCache files are placed.

    • Dynamic: No

    • Default: The working directory

    gcache.keep_pages_size

    • Description: Total size of the page storage pages for caching. One page is always present if only page storage is enabled.

    • Dynamic: No

    • Default: 0

    gcache.mem_size

    • Description: Maximum size of size of the malloc() store for setups that have spare RAM.

    • Dynamic: No

    • Default: 0

    gcache.name

    • Description: Gcache ring buffer storage file name. By default placed in the working directory, changing to another location or partition can reduce disk IO.

    • Dynamic: No

    • Default: ./galera.cache


    gcache.page_size

    • Description: Size of the page storage page files. These are prefixed by gcache.page. Can be set to as large as the disk can handle.

    • Dynamic: No

    • Default: 128M

    gcache.recover

    • Description: Whether or not gcache recovery takes place when the node starts up. If it is possible to recover gcache, the node can then provide IST to other joining nodes, which assists when the whole cluster is restarted.

    • Dynamic: No

    • Default: no

    • Introduced: , ,

    gcache.size

    • Description: Gcache ring buffer storage size (the space the node uses for caching write sets), preallocated on startup.

    • Dynamic: No

    • Default: 128M

    gcomm.thread_prio

    fifo or rr real-time scheduling policies requires mariadb service permissions at the OS level.

    • Description: Gcomm thread policy and priority (in the format policy:priority. Priority is an integer, while policy can be one of:

      • fifo: First-in, first-out scheduling. Always preempt other, batch or idle threads and can only be preempted by other fifo threads of a higher priority or blocked by an I/O request.

      • rr

    gcs.fc_debug

    • Description: If set to a value greater than zero (the default), debug statistics about SST flow control will be posted each timegcs.fc_master_slave after the specified number of writesets.

    • Dynamic: No

    • Default: 0

    gcs.fc_factor

    • Description:Fraction below which if the recv queue drops below, replication resumes.

    • Dynamic: Yes

    • Default: 1.0

    gcs.fc_limit

    • Description: If the recv queue exceeds this many writesets, replication is paused. Can increase greatly in master-slave setups. Replication will resume again according to the setting.

    • Dynamic: Yes

    • Default: 16

    gcs.fc_master_slave

    • Description: Whether to assume that the cluster only contains one master. Deprecated since Galera 4.10 (, , , , ) - see

    • Dynamic: No

    • Default: no

    gcs.fc_single_primary

    • Description: Defines whether there is more than one source of replication. As the number of nodes in the cluster grows, the larger the calculated gcs.fc_limit gets. At the same time, the number of writes from the nodes increases. When this parameter value is set to NO (multi-primary), the gcs.fc_limit parameter is dynamically modified to give more margin for each node to be a bit further behind applying writes. The gcs.fc_limit parameter is modified by the square root of the cluster size, that is, in a four-node cluster it is two times higher than the base value. This is done to compensate for the increasing replication rate noise.

    • Dynamic: No

    • Default: no

    gcs.max_packet_size

    • Description: Maximum packet size, after which writesets become fragmented.

    • Dynamic: No

    • Default: 64500

    gcs.max_throttle

    • Description: How much we can throttle replication rate during state transfer (to avoid running out of memory). Set it to 0.0 if stopping replication is acceptable for the sake of completing state transfer.

    • Dynamic: No

    • Default: 0.25

    gcs.recv_q_hard_limit

    • Description: Maximum size of the recv queue. If exceeded, the server aborts. Half of available RAM plus swap is a recommended size.

    • Dynamic: No

    • Default: LLONG_MAX

    gcs.recv_q_soft_limit

    • Description: Fraction of after which replication rate is throttled. The rate of throttling increases linearly from zero (the regular, varying rate of replication) at and below csrecv_q_soft_limit to one (full throttling) at

    • Dynamic: No

    • Default: 0.25

    gcs.sync_donor

    • Description: Whether or not the rest of the cluster should stay in sync with the donor. If set to YES (NO is default), if the donor is blocked by state transfer, the whole cluster is also blocked.

    • Dynamic: No

    • Default: no

    gmcast.listen_addr

    • Description: Address Galera listens for connections from other nodes. Can be used to override the default port to listen, which is obtained from the connection address.

      • Specifying a hostname isn't supported. Use an IP number instead.

        • Note that supports TCP, SSL, and hostnames.

    gmcast.mcast_addr

    • Description: Not set by default, but if set, UDP multicast will be used for replication. Must be identical on all nodes.For example, gmcast.mcast_addr=239.192.0.11

    • Dynamic: No

    • Default: None

    gmcast.mcast_ttl

    • Description: Multicast packet TTL (time to live) value.

    • Dynamic: No

    • Default: 1

    gmcast.peer_timeout

    • Description: Connection timeout for initiating message relaying.

    • Dynamic: No

    • Default: PT3S

    gmcast.segment

    • Description: Defines the segment to which the node belongs. By default, all nodes are placed in the same segment (0). Usually, you would place all nodes in the same datacenter in the same segment. Galera protocol traffic is only redirected to one node in each segment, and then relayed to other nodes in that same segment, which saves cross-datacenter network traffic at the expense of some extra latency. State transfers are also, preferably but not exclusively, taken from the same segment. If there are no nodes available in the same segment, state transfer will be taken from a node in another segment.

    • Dynamic: No

    • Default: 0

    gmcast.time_wait

    • Description: Waiting time before allowing a peer that was declared outside of the stable view to reconnect.

    • Dynamic: No

    • Default: PT5S

    gmcast.version

    • Description: Deprecated option. Gmcast version.

    • Dynamic: No

    • Default: 0

    ist.recv_addr

    • Description: Address for listening for Incremental State Transfer.

    • Dynamic: No

    • Default::<port+1> from

    ist.recv_bind

    • Description:

    • Dynamic: No

    • Default: Empty string

      • Introduced: , ,

    pc.announce_timeout

    • Description: Period of time for which cluster joining announcements are sent every 1/2 second.

    • Dynamic: No

    • Default: PT3S

    pc.checksum

    • Description: For debug purposes, by default false (true in earlier releases), indicates whether to checksum replicated messages on PC level. Safe to turn off.

    • Dynamic: No

    • Default: false

    pc.ignore_quorum

    • Description: Whether to ignore quorum calculations, for example when a master splits from several slaves, it will remain in operation if set to true (false is default). Use with care however, as in master-slave setups, slaves will not automatically reconnect to the master if set.

    • Dynamic: Yes

    • Default: false

    pc.ignore_sb

    • Description: Whether to permit updates to be processed even in the case of split brain (when a node is disconnected from its remaining peers). Safe in master-slave setups, but could lead to data inconsistency in a multi-master setup.

    • Dynamic: Yes

    • Default: false

    pc.linger

    • Description: Time that the PC protocol waits for EVS termination.

    • Dynamic: No

    • Default: PT20S

    pc.npvo

    • Description: If set to true (false is default), when there are primary component conficts, the most recent component will override the older.

    • Dynamic: No

    • Default: false

    pc.recovery

    • Description: If set to true (the default), the Primary Component state is stored on disk and in the case of a full cluster crash (e.g power outages), automatic recovery is then possible. Subsequent graceful full cluster restarts will require explicit bootstrapping for a new Primary Component.

    • Dynamic: No

    • Default: true

    pc.version

    • Description: Deprecated option. PC protocol version.

    • Dynamic: No

    • Default: 0

    pc.wait_prim

    • Description: When set to true, the default, the node will wait for a primary component for the period of time specified by . Used to bring up non-primary components and make them primary using .

    • Dynamic: No

    • Default: true

    pc.wait_prim_timeout

    • Description: Ttime to wait for a primary component. See .

    • Dynamic: No

    • Default: PT30S

    pc.weight

    • Description: Node weight, used for quorum calculation. See the Codership article .

    • Dynamic: Yes

    • Default: 1

    protonet.backend

    • Description: Deprecated option. Transport backend to use. Only ASIO is supported currently.

    • Dynamic: No

    • Default: asio

    protonet.version

    • Description: Deprecated option. Protonet version.

    • Dynamic: No

    • Default: 0

    repl.causal_read_timeout

    • Description: Timeout period for causal reads.

    • Dynamic: Yes

    • Default: PT30S

    repl.commit_order

    • Description: Whether or not out-of-order committing is permitted, and under what conditions. By default it is not permitted, but setting this can improve parallel performance.

      • 0 BYPASS: No commit order monitoring is done (useful for measuring the performance penalty).

      • 1 OOOC: Out-of-order committing is permitted for all transactions.

    repl.key_format

    • Description: Format for key replication. Can be one of:

      • FLAT8 - shorter key with a higher probability of false positives when matching

      • FLAT16 - longer key with a lower probability of false positives when matching

    repl.max_ws_size

    • Description:

    • Dynamic:

    • Default: 2147483647

    repl.proto_max

    • Description:

    • Dynamic:

    • Default: 9

    socket.checksum

    • Description: Method used for generating checksum. Note: If Galera 25.2.x and 25.3.x are both being used in the cluster, MariaDB with Galera 25.3.x must be started with wsrep_provider_options='socket.checksum=1' in order to make it backward compatible with Galera v2. Galera wsrep providers other than 25.3.x or 25.2.x are not supported.

    • Dynamic: No

    • Default: 2

    socket.dynamic

    • Description: Allow both encrypted and unencrypted connections between nodes. Typically this should be set to false (the default), when set to true encrypted connections will still be preferred, but will fall back to unencrypted connections when encryption is not possible, e.g. not enabled on all nodes yet. Needs to be true on all nodes when wanting to enable or disable encryption via a rolling restart. As this can't be changed at runtime a rolling restart to enable or disable encryption may need three restarts per node in total: one to enable socket.dynamic on each node, one to change the actual encryption settings on each node, and a final round to change socket.dynamic back to false.

    socket.recv_buf_size

    • Description: Size in bytes of the receive buffer used on the network sockets between nodes, passed on to the kernel via the SO_RCVBUF socket option.

    • Dynamic: No

    • Default:

      • = , ,

    socket.send_buf_size

    • Description: Size in bytes of the send buffer used on the network sockets between nodes, passed on to the kernel via the SO_SNDBUF socket option.

    • Dynamic: No

    • Default:: Auto

    • Introduced: , ,

    socket.ssl

    • Description: Explicitly enables TLS usage by the wsrep Provider.

    • Dynamic: No

    • Default: NO

    socket.ssl_ca

    • Description: Path to Certificate Authority (CA) file. Implicitly enables the option.

    • Dynamic: No

    socket.ssl_cert

    • Description: Path to TLS certificate. Implicitly enables the option.

    • Dynamic: No

    socket.ssl_cipher

    • Description: TLS cipher to use. Implicitly enables the option. Since defaults to the value of the system variable.

    • Dynamic: No

    • Default: system default, before defaults to AES128-SHA.

    socket.ssl_compression

    • Description: Compression to use on TLS connections. Implicitly enables the option.

    • Dynamic: No

    socket.ssl_key

    • Description: Path to TLS key file. Implicitly enables the option.

    • Dynamic: No

    socket.ssl_password_file

    • Description: Path to password file to use in TLS connections. Implicitly enables the option.

    • Dynamic: No

    See Also

    This page is licensed: CC BY-SA / Gnu FDL

    0x8 – profiling (only available in builds with profiling enabled)

  • Dynamic: No

  • Default: 0

  • : Round-robin scheduling. Always preempt other, batch or idle threads. Runs for a fixed period of time after which the thread is stopped and moved to the end of the list, being replaced by another round-robin thread with the same priority. Otherwise runs until preempted by other
    rr
    threads of a higher priority or blocked by an I/O request.
  • other: Default scheduling on Linux. Threads run until preempted by a thread of a higher priority or a superior scheduling designation, or blocked by an I/O request.

  • Permissions: Using the fifo or rr real-time scheduling policies requires granting the mariadb service the necessary permissions at the OS level. On systemd-based distributions, this is done by adjusting the resource limits for the service.

    The recommended method is to create a systemd override file:

    1. Open the MariaDB service unit for editing:

    2. Add the following content to the file. This grants the service the ability to set real-time priorities:

    3. Save the file and exit the editor.

    4. Reload the systemd daemon and restart the MariaDB service to apply the changes:

  • Dynamic: No

  • Default: Empty string

  • You can specify the setting using either TCP or SSL, like this:
    • gmcast.listen_addr=tcp://192.168.8.111:4567

    • gmcast.listen_addr=ssl://192.168.8.111:4567

  • If your system supports IPv6, you can also specify it like this:

    • gmcast.listen_addr=tcp://[::]:@mysqld.1.#4567

    • Here, @mysqld.1 is an environment variable, and 4567 is the Galera port.

  • Dynamic: No

  • Default: tcp://0.0.0.0:4567

  • Range: 0 to 255

    2 LOCAL_OOOC: Out-of-order committing is permitted for local transactions only.

  • 3 NO_OOOC: Out-of-order committing is not permitted at all.

  • Dynamic: No

  • Default: 3

  • FLAT8A - shorter key with a higher probability of false positives when matching, includes annotations for debug purposes
  • FLAT16A - longer key with a lower probability of false positives when matching, includes annotations for debug purposes

  • Dynamic: Yes

  • Default: FLAT8

  • Dynamic: No
  • Default: false

  • Introduced: , ,

  • : Auto
  • < : , : 212992

  • Auto Eviction
    evs.keepalive_period
    wsrep_debug
    evs.auto_evict
    evs.auto_evict
    evs.auto_evict
    evs.user_send_window
    evs.inactive_timeout
    evs.send_window
    gcs.fc_limit
    gcs.fc_factor
    gcs.fc_single_primary
    gcs.recv_q_hard_limit
    gcs.recv_q_hard_limit
    wsrep_cluster_address
    wsrep_node_address
    pc.wait_prim_timeout
    pc.bootstrap
    pc.wait_prim
    Weighted Quorum
    socket.ssl
    socket.ssl
    socket.ssl
    socket.ssl
    socket.ssl
    socket.ssl
    Galera parameters documentation from Codership
    sudo systemctl edit mariadb
    [Service]
    LimitRTPRIO=infinity
    sudo systemctl daemon-reload
    sudo systemctl restart mariadb
    MariaDB 10.4
    MariaDB 10.1.2
    MariaDB 10.10
    MariaDB 10.6.1
    MariaDB 10.6
    MariaDB 10.7
    MariaDB 10.6.0
    MariaDB 10.7
    MariaDB 12.1
    MariaDB 11.3.0
    MariaDB 10.5.1
    MariaDB 11.5
    MariaDB 10.6.0
    MariaDB 10.6.0
    MariaDB 10.7.0
    MariaDB 10.9
    MariaDB 10.5.1
    MariaDB 10.6.0
    MariaDB 10.7.0
    MariaDB 10.1.20
    MariaDB Galera 10.0.29
    MariaDB Galera 5.5.54
    MariaDB 10.8.1
    MariaDB 10.7.2
    MariaDB 10.6.6
    MariaDB 10.5.14
    MariaDB 10.4.22
    MariaDB 10.1.17
    MariaDB Galera 10.0.27
    MariaDB Galera 5.5.51
    MariaDB 10.3.23
    MariaDB 10.2.32
    MariaDB 10.3.23
    MariaDB 10.2.32
    MariaDB 10.1.45
    MariaDB 10.2.18
    MariaDB 10.2.18
    MariaDB 10.4.19
    MariaDB 10.5.10
    MariaDB 10.6.0
    MariaDB 10.1.45
    MariaDB 10.3.22
    MariaDB 10.2.31
    MariaDB 10.1.44
    SHOW STATUS
    Full list of MariaDB options, system and status variables
    SHOW VARIABLES
    migrating from a MySQL-based Galera cluster
    SET GLOBAL
    MariaDB Error Log
    InnoDB storage engine
    CREATE USER
    MyISAM
    LOCK TABLES
    FLUSH TABLES {explicit table list} WITH READ LOCK
    GET_LOCK()
    RELEASE_LOCK()
    FLUSH TABLES WITH READ LOCK
    DELETE
    general query log
    slow query log
    log_output=FILE
    LOAD DATA
    mysqldump
    error log
    binlog_format
    Binary Log Formats
    binlog_format
    query cache
    query_cache_size=0
    schema compatibility restrictions
    Galera Options
    Server System Variables
    Full list of MariaDB options, system and status variables
    auto_increment_increment
    auto_increment_offset
    auto_increment
    read-committed
    primary key
    LOCK
    UNLOCK TABLES
    BEGIN
    COMMIT
    enum
    AUTO_INCREMENT
    binary log format
    GTID
    gtid_domain_id
    GTIDs
    GTID
    MariaDB replication
    gtid_domain_id
    LOAD DATA INFILE
    binlog format
    --bind-address
    error log
    MyISAM
    SHOW VARIABLES
    --bind-address
    CREATE TABLE
    ALTER TABLE
    CREATE VIEW
    CREATE TRIGGER
    CREATE INDEX
    RENAME TABLE
    DROP TABLE
    procedures
    events
    functions
    datadir
    GTIDs
    GTIDs
    Aria
    MyISAM
    must be backwards compatible in the same way as for ROW based replication
    ssl_cipher