In addition to the configuration for the database server, there are some specific options that you need to set to enable write-set replication. You must apply these changes to the configuration file, that is my.cnf, for each node in your cluster.
wsrep_cluster_name Use this parameter to set the logical name for your cluster. You must use the same name for every node in your cluster. The connection fails on nodes that have different values for this parameter.
wsrep_cluster_address Use this parameter to define the IP addresses for the cluster in a comma separated list.
See Also: There are additional schemas and options available through this parameter. For more information on the syntax, see Understanding Cluster Addresses below.
wsrep_node_name Use this parameter to define the logical name for the individual node—for convenience.
wsrep_node_address Use this parameter to explicitly set the IP address for the individual node. It gets used in the event that the auto-guessing does not produce desirable results.
[mysql] wsrep_cluster_name=MyCluster wsrep_cluster_address="gcomm://192.168.0.1,192.168.0.2,192.168.0.3" wsrep_node_name=MyNode1 wsrep_node_address="192.168.0.1"
For each node in the cluster, you must provide IP addresses for all other nodes in the cluster, using the wsrep_cluster_address parameter. Cluster addresses are listed using a particular syntax:
<backend schema>://<cluster address>[?<option1>=<value1>[&<option2>=<value2>]]
There are two backend schemas available for Galera Cluster.
For this section, provide a comma separate list of IP addresses for nodes in the cluster. The values here can indicate,
If you start the node without an IP address for this parameter, the node assumes that it is the first node of a new cluster. It initializes a cluster as though you launched mysqld with the --wsrep-new-cluster option.
You can also use the options list to set backend parameters, such as the listen address and timeout values.
See Also: The wsrep_cluster_address options list is not durable. The node must resubmit the options on every connection to the cluster. To make these options durable, set them in the configuration file using the wsrep_provider_options parameter.
The options list set in the URL take precedent over parameters set elsewhere. Parameters that you can set through the options list are prefixed by evs, pc and gmcast.
See Also: For more information on the available parameters, see Galera Parameters.
You can set the options with a list of key=value pairs according to the URL standard. For example,
wsrep_cluster_address="gcomm://192.168.0.1, 192.168.0.2, 192.168.0.3 ? gmcast.segment=0 & evs.max_install_timeouts=1"
If the listen address and port are not set in the parameter list, gcomm will listen on all interfaces. The listen port will be taken from the cluster address. If it is not specified in the cluster address, the default port is 4567.