Galera Configuration

Each MySQL/Galera node is configured just like the usual MySQL server, we just added few configuration variables to my.cnf. In addition some options can be passed to mysql-galera startup script (see mysql-galera --help).


Mandatory Configuration Options



log_bin=mysql-bin
binlog_format=ROW

Those two options are required to use ROW-level replication as opposed to statement-level. For performance and consistency considerations don't change that. As a side effect, binlog is temporarily disabled. In future those options won't have special meaning.



innodb_lock_wait_timeout=9999999

This option is required for correct conflict resolution.

Mandatory options are hardcoded both in demo my.cnf file and in mysql-galera script.


WSREP Options


Here WSREP stands for Write-Set REPlication - a synchronous replication API that Codership is developing for transactional databases. Galera is a library that implements WSREP services. Default values are shown.



  • wsrep_provider=none A full path to the library that implements WSREP interface. If none is specified, the server behaves almost like a normal mysqld, with slight overhead. mysql-galera script automatically substitutes it to point to the Galera implementation shipped with the demo. It can be overridden with WSREP environment variable.
  • wsrep_gcs_address="dummy://" Group Communication System address. Depends on the WSREP provider. Galera recognises "dummy://" and "gcomm://tcp::"
  • wsrep_gcs_group="my_cluster" Logical group name, must be the same for all nodes of the cluster.
  • wsrep_slave_threads=1 Number of threads dedicated to processing of write sets from other nodes. Values greater than 1 not tested.
  • wsrep_dbug_option Options for the built-in DBUG library (independent from what MySQL uses). Empty by default.
  • wsrep_local_cache_size=16777216 Amount of RAM reserved for write set cache in bytes. Excess write sets are stored on the hard drive in MySQL data directory
  • wsrep_ws_persistency=0 Save write sets in binary files. For debugging purposes only.
  • wsrep_debug=0 Enable debug-level logging.