This page documents system variables related to Galera Cluster. For options that are not system variables, see Galera Options.
See Server System Variables for a complete list of system variables and instructions on setting them.
Also see the Full list of MariaDB options, system and status variables.
wsrep_auto_increment_control
1
(the default), will automatically adjust the auto_increment_increment and auto_increment_offset variables according to the size of the cluster, and when the cluster size changes. This avoids replication conflicts due to auto_increment. In a master-slave environment, can be set to OFF
. --wsrep-auto-increment-control[={0|1}]
ON
wsrep_causal_reads
ON
(OFF
is default), enforces read-committed characteristics across the cluster. In the case that a master applies an event more quickly than a slave, the two could briefly be out-of-sync. With this variable set to ON
, the slave will wait for the event to be applied before processing further queries. Setting to ON
also results in larger read latencies. Deprecated by wsrep_sync_wait=1. --wsrep-causal-reads[={0|1}]
OFF
wsrep_certification_rules
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-certifcation-rules
strict
strict
, optimized
wsrep_certify_nonPK
ON
(the default), primary keys will be automatically generated for tables without one. This is required for parallel applying, and strongly recommended for all tables. --wsrep-certify-nonPK[={0|1}]
ON
wsrep_cluster_address
gcomm://192.168.0.1:1234?gmcast.listen_addr=0.0.0.0:2345
. 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). 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. --wsrep-cluster-address=value
wsrep_cluster_name
--wsrep-cluster-name=value
my_wsrep_cluster
wsrep_convert_LOCK_to_trx
--wsrep-convert-LOCK-to-trx[={0|1}]
OFF
wsrep_data_home_dir
--wsrep-data-home-dir=value
wsrep_dbug_option
--wsrep-dbug-option=value
wsrep_debug
ON
(OFF
is default), debug messages will be logged to the error log as well. --wsrep-debug[={0|1}]
NONE
(>= MariaDB 10.4.3), OFF
(<= MariaDB 10.4.2) NONE
, SERVER
, TRANSACTION
, STREAMING
, CLIENT
wsrep_desync
gcs.fc_limit
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 wsrep_local_state_comment
status variable is equal to Donor/Desynced
. --wsrep-desync[={0|1}]
OFF
wsrep_dirty_reads
wsrep_dirty_reads
is set to 1
, queries which do not change data, like SELECT queries (dirty reads), creating of prepare statement, etc. will be accepted by the node. --wsrep-dirty-reads[={0|1}]
OFF
ON
, OFF
wsrep_drupal_282555_workaround
ON
, a workaround for Drupal/MySQL/InnoDB bug #282555 is enabled. This is a bug where, in some cases, when inserting a DEFAULT
value into an AUTO_INCREMENT column, a duplicate key error may be returned. --wsrep-drupal-282555-workaround[={0|1}]
OFF
wsrep_forced_binlog_format
--wsrep-forced-binlog-format=value
NONE
STATEMENT
, ROW
, MIXED
or NONE
(which resets the forced binlog format state). wsrep_gtid_domain_id
wsrep_gtid_mode
is set to ON
, wsrep_gtid_domain_id
is used in place of gtid_domain_id
for all Galera Cluster write sets. wsrep_gtid_mode
is set to OFF
, wsrep_gtid_domain_id
is simply ignored to allow for backward compatibility. --wsrep-gtid-domain-id=#
numeric
0
0
to 4294967295
wsrep_gtid_mode
wsrep_gtid_mode
is set to ON
, wsrep_gtid_domain_id
is used in place of gtid_domain_id
for all Galera Cluster write sets. wsrep_gtid_mode
is set to OFF
, wsrep_gtid_domain_id
is simply ignored to allow for backward compatibility. --wsrep-gtid-mode[={0|1}]
boolean
OFF
wsrep_ignore_apply_errors
--wsrep-ignore-apply-errors
0
0
to 7
wsrep_load_data_splitting
ON
(the default for MariaDB 10.4.2 and before), LOAD DATA INFILE supports big data files by introducing transaction splitting. The setting has been deprecated in Galera 4, and defaults to OFF
from MariaDB 10.4.3. --wsrep-load-data-splitting[={0|1}]
OFF
(>= MariaDB 10.4.3), ON
(<= MariaDB 10.4.2) wsrep_log_conflicts
ON
(OFF
is default), details of conflicting MDL as well as InnoDB locks in the cluster will be logged. --wsrep-log-conflicts[={0|1}]
OFF
wsrep_max_ws_rows
0
, which essentially allows writesets to be any size. --wsrep-max-ws-rows=#
0
(>= MariaDB Galera 10.0.27, MariaDB 10.1.17) 131072
(<= MariaDB Galera 10.0.26, MariaDB 10.1.16) 0
to 1048576
wsrep_max_ws_size
--wsrep-max-ws-size=#
2147483647
(2GB, >= MariaDB Galera 10.0.27, MariaDB 10.1.17) 1073741824
(1GB, <= MariaDB Galera 10.0.26, MariaDB 10.1.16) 1024
to 2147483647
wsrep_mysql_replication_bundle
0
(the default), there is no grouping. --wsrep-mysql-replication-bundle=#
0
0
to 1000
wsrep_node_address
ip address[:port]
. As of MariaDB 10.1.8, 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 autoguessing can be unreliable, particularly in the following cases: --wsrep-node-address=value
eth0
with a default port of 4567, or 0.0.0.0
if no IP address. wsrep_node_incoming_address
AUTO
(default), mysqld uses either --bind-address or --wsrep-node-address, or tries to get one from the list of available network interfaces, in the same order. --wsrep-node-incoming-address=value
AUTO
wsrep_node_name
--wsrep-node-name=value
wsrep_notify_cmd
--wsrep-notify-command=value
wsrep_on
OFF
(the default since MariaDB 10.1), 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. Before MariaDB 10.1, even though this variable is ON
by default, its value gets automatically adjusted based on whether mandatory configurations to turn on Galera replication have been specified. Since MariaDB 10.1, it is set to OFF
by default and must be turned on to enable Galera replication. --wsrep-on[={0|1}]
OFF
(>= MariaDB 10.1), ON
(<= MariaDB Galera Cluster 10.0), ON
, OFF
wsrep_OSU_method
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
: 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 must be backwards compatible in the same way as for ROW based replication to avoid breaking replication when the DDL processing is complete on the single node, and replication recommences. --wsrep-OSU-method[=value]
TOI
TOI
, RSU
wsrep_patch_version
wsrep_25.10
. wsrep_provider
/usr/lib/libgalera_smm.so
on Debian and Ubuntu, and /usr/lib64/libgalera_smm.so
on Red Hat/CentOS. --wsrep-provider=value
wsrep_provider_options
--wsrep-provider-options=value
wsrep_recover
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 error log. At that point, the server will exit. This sequence number can be provided to the wsrep_start_position
system variable. --wsrep-recover[={0|1}]
OFF
wsrep_reject_queries
Error 1047: Unknown command
error is generated by a client query. NONE
- Not set. Queries will be processed as normal. ALL
- All queries from client connections will be rejected, but existing client connections will be maintained. ALL_KILL
All queries from client connections will be rejected, and existing client connections, including the current one, will be immediately killed. --wsrep-reject-queries[=value]
NONE
NONE
, ALL
, ALL_KILL
wsrep_replicate_myisam
--wsrep-replicate-myisam[={0|1}]
OFF
ON
, OFF
wsrep_restart_slave
--wsrep-restart-slave[={0|1}]
OFF
wsrep_retry_autocommit
0
, no retries will be 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. --wsrep-retry-autocommit=value
1
0
to 10000
wsrep_slave_FK_checks
--wsrep-slave-FK-checks[={0|1}]
wsrep_slave_threads
1
will probably fix the problem. See About Galera Replication: Galera Slave Threads for more information. --wsrep-slave-threads=
# 1
1
to 512
wsrep_slave_UK_checks
--wsrep-slave-UK-checks[={0|1}]
wsrep_sr_store
--wsrep-sr-store=val
table
table
, none
wsrep_sst_auth
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 SHOW VARIABLES. See Introduction to State Snapshot Transfers (SSTs) for more information. --wsrep-sst-auth=value
wsrep_sst_donor
--wsrep-sst-donor=value
wsrep_sst_donor_rejects_queries
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. --wsrep-sst-donor-rejects-queries[={0|1}]
OFF
wsrep_sst_method
--wsrep-sst-method=value
rsync
rsync
, mysqldump
, xtrabackup
, xtrabackup-v2
, mariabackup
wsrep_sst_receive_address
AUTO
(default), mysqld uses --wsrep_node_address's value as the receiving address. However, if --wsrep_node_address is not set, it uses address from either --bind-address 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 Introduction to State Snapshot Transfers (SSTs) for more information. --wsrep-sst-receive-address=value
AUTO
wsrep_start_position
UUID:seq_no
. The proper value to use for this position can be recovered with wsrep_recover
. --wsrep-start-position=value
00000000-0000-0000-0000-000000000000:-1
wsrep_sync_wait
SET SESSION wsrep_sync_wait=1; SELECT ...; SET SESSION wsrep_sync_wait=0;
0
- Disabled (default) 1
- READ (SELECT and BEGIN/START TRANSACTION). Up until MariaDB 10.2.8, MariaDB 10.1.26, MariaDB Galera 10.0.31 and MariaDB Galera 5.5.56, also SHOW). 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 (from MariaDB 10.2.9, MariaDB 10.1.27, MariaDB Galera 10.0.32, MariaDB Galera 5.5.57) 9
- READ and SHOW (from MariaDB 10.2.9, MariaDB 10.1.27, MariaDB Galera 10.0.32, MariaDB Galera 5.5.57) 10
- UPDATE, DELETE and SHOW (from MariaDB 10.2.9, MariaDB 10.1.27, MariaDB Galera 10.0.32, MariaDB Galera 5.5.57) 11
- READ, UPDATE, DELETE and SHOW (from MariaDB 10.2.9, MariaDB 10.1.27, MariaDB Galera 10.0.32, MariaDB Galera 5.5.57) 12
- INSERT, REPLACE and SHOW (from MariaDB 10.2.9, MariaDB 10.1.27, MariaDB Galera 10.0.32, MariaDB Galera 5.5.57) 13
- READ, INSERT, REPLACE and SHOW (from MariaDB 10.2.9, MariaDB 10.1.27, MariaDB Galera 10.0.32, MariaDB Galera 5.5.57) 14
- UPDATE, DELETE, INSERT, REPLACE and SHOW (from MariaDB 10.2.9, MariaDB 10.1.27, MariaDB Galera 10.0.32, MariaDB Galera 5.5.57) 15
- READ, UPDATE, DELETE, INSERT, REPLACE and SHOW (from MariaDB 10.2.9, MariaDB 10.1.27, MariaDB Galera 10.0.32, MariaDB Galera 5.5.57) --wsrep-sync-wait=
# 0
0
to 15
(>= MariaDB 10.2.9, MariaDB 10.1.27, MariaDB Galera 10.0.32, MariaDB Galera 5.5.57) 0
to 7
(<= MariaDB 10.2.8, MariaDB 10.1.26, MariaDB Galera 10.0.31, MariaDB Galera 5.5.56) wsrep_trx_fragment_size
--wsrep-trx-fragment-size=
# 0
0
to 2147483647
wsrep_trx_fragment_unit
bytes
: transaction’s binlog events buffer size in bytes rows
: number of rows affected by the transaction statements
: number of SQL statements executed in the multi-statement transaction --wsrep-trx-fragment-unit=value
bytes
bytes
, rows
or statements
© 2019 MariaDB
Licensed under the Creative Commons Attribution 3.0 Unported License and the GNU Free Documentation License.
https://mariadb.com/kb/en/galera-cluster-system-variables/