MySQL wsrep options

These are MySQL system variables introduced by wsrep patch v0.8. All variables are global except where marked by (L).

Option Default Description
wsrep_auto_increment_control ON Automatically adjust auto_increment_increment and auto_increment_offset system variables when cluster membership changes.
wsrep_causal_reads (L) OFF Enforce strict cluster-wide “read committed” semantics on non-transactional reads. Results in larger read latencies.
wsrep_certify_nonPK ON Generate primary keys for rows without ones for the purpose of certification. This is required for parallel applying. We don't recommend using tables without primary keys.
wsrep_cluster_address Address to connect to cluster. Galera takes addresses in URL format:
<backend schema>://<cluster address>[?option1=value1[&option2=value2]]

e.g.

gcomm://192.168.0.1:4567?gmcast.listen_addr=0.0.0.0:5678

Changing this variable in runtime will cause the node to close connection to the current cluster (if any) and reconnect to the new address. (However, doing this at runtime may not be possible for all SST methods.) Since Galera 23.2.2 it is possible to provide a comma separated list of other nodes in the cluster:

gcomm://node1:port1,node2:port2,...[?option1=value1&...]

Using the string “gcomm:/ /” without any address will cause the node to startup alone, thus initializing a new cluster (that other nodes can join). Note: You should never use the empty “gcomm:/ /” string in my.cnf. If a node restarts, that will cause the node to not join back to the cluster that it was part of, rather it will initialize a new one node cluster and cause split brain. To bootstrap a cluster, you should only pass the “gcomm:/ /” string on the command line, such as

service mysql start --wsrep-cluster-address="gcomm://"
wsrep_cluster_name my_test_cluster Logical cluster name. If a node tries to connect to a cluster with a different name, connection fails
wsrep_convert_LOCK_to_trx OFF Convert LOCK/UNLOCK TABLES statements to BEGIN/COMMIT. Sometimes this may help to get old applications working in multi-master setup. Use with caution, may result in HUGE writesets.
wsrep_data_home_dir <mysql_real_data_home> A directory where wsrep provider will store its files. Galera uses it to store its internal state.
wsrep_dbug_option A DBUG option to pass to provider (if it cares)
wsrep_debug OFF Enable debug log output
wsrep_drupal_282555_workaround ON Enable workaround for Drupal (actually MySQL/InnoDB) bug #282555 when inserting DEFAULT value into an AUTO_INCREMENT column may return a duplicate key error
wsrep_max_ws_rows 128K Maximum number of rows allowed in the writeset. Currently it limits supported size of transaction and LOAD DATA statement.
wsrep_max_ws_size 1G Maximum allowed writeset size. Currently it limits supported size of transaction and LOAD DATA statement.
wsrep_node_address <address>[:port] An option to explicitly specify the network address of the node if autoguessing for some reason does not produce desirable results (multiple network interfaces, NAT, etc.) By default the address of the first network interface (eth0) is used, and the default port is 4567. The <address> and :port will be passed to the wsrep provider (Galera) to be used as base address in its communications. It will also be used to derive default values for wsrep_sst_receive_address and ist.recv_address.
wsrep_node_incoming_address <address>[:mysqld_port] Address at which server expects client connections. Intended for integration with load balancers. Not used for now.
wsrep_node_name <hostname> Logical node name - for convenience.
wsrep_notify_cmd A command to run when cluster membership or state of this node changes. Notification command arguments.
wsrep_on (L) ON Use wsrep replication. When turned off, no changes made in this session will be replicated.
wsrep_OSU_method 'TOI' Online schema upgrade method (MySQL >= 5.5.17). See Rolling Schema Upgrade.
wsrep_provider none A path to wsrep provider to load. If not specified, all calls to wsrep provider will be bypassed.
wsrep_provider_options A string of provider options passed directly to provider. A list of Galera options.
wsrep_retry_autocommit 1 If an autocommit query fails due to cluster-wide conflict we can retry it without returning error to client. This sets how many times to retry.
wsrep_slave_threads 1 How many threads to use for applying slave writsets. There two things to consider when choosing the number:
1) We'd recommend it to be at least 2 times the number of CPU cores.
2) Consider how many writing client connections the other nodes would have. Make it 1/4th of that amount.
wsrep_sst_auth A string with authentication information for state snapshot transfer. It depends on the state transfer method. For mysqldump state transfer it should be <user>:<password> where user has root privileges on this server. For rsync method it is ignored.
wsrep_sst_donor A name (given in wsrep_node_name) of the server that should be used as a source for state transfer. If not specified, Galera will choose the most appropriate one.
wsrep_sst_method mysqldump A method to use for state snapshot transfer. wsrep_sst_<wsrep_sst_method> command will be called with the following arguments.
wsrep_sst_receive_address <wsrep_node_address> The address at which this node expects to receive state transfer. Depends on state transfer method. E.g. for mysqldump state transfer it is the address and the port on which this server listens. By default this is set to the <address> part of wsrep_node_address.
wsrep_start_position 00000000-0000-0000-0000-000000000000:-1 This variable exists for the sole purpose of notifying joining node about state transfer completion. See description of state transfer interface.
wsrep_ws_persistency OFF Whether to store writesets locally for debugging. Not used in 0.8.
Login