The Mariadb-gelera configuration is divided into two parts:
The first part: normal configuration
Part Two: Cluster configuration
The Mariadb-gelera configuration file is:
/etc/my.cnf.d/server.cnf
The production environment of our company adopts the following version:
MARIADB 10.1.8
Normal configuration:
Reference: http://liuzhengwei521.blog.51cto.com/4855442/1881278
Cluster configuration: This configuration can be applied to production environments
[galera]
wsrep_on=on
wsrep_ Provider =/usr/lib64/galera/libgalera_smm.so
wsrep_cluster_address= ' gcomm:// 192.168.0.242:4567,192.168.0.243:4567 '
binlog_format=row
default_storage_engine=innodb
innodb_autoinc_lock_mode=2
wsrep_retry_autocommit = 0
wsrep_provider_options= "Gcache.size=200M; base_ port=4567; gcache.page_size=100m "
wsrep_slave_threads=4
wsrep_ Cluster_name= ' mysql_db_cluster '
wsrep_node_address= ' 192.168.0.241 '
wsrep_provider_options= "base_port=4567;"
wsrep_node_name= ' test '
wsrep_sst_method=xtrabackup-v2
wsrep_sst_auth= "sst:[email protected]"
Configuration Description:
WSREP_ON: Indicates to turn on Mariadb-gelera cluster mode, otherwise stand-alone mariadb mode
Wsrep_cluster_address: IP address of other nodes in the cluster
Binlog_format=row: Record the format of the Binlog
Wsrep_slave_threads: Set the number of threads
Wsrep_cluster_name: Set the name of the cluster
Wsrep_node_address: Sets the IP of the current node
Wsrep_node_name= ' test ': Sets the name of the current node and can be any name
Wsrep_sst_method: Set all node data synchronization methods in the cluster
Wsrep_sst_auth: Set a password for each cluster in the cluster to authenticate each other
This article is from the "burning Years of Passion" blog, please be sure to keep this source http://liuzhengwei521.blog.51cto.com/4855442/1908364
MARIADB Gelera Cluster configuration