Last active
June 15, 2017 18:42
-
-
Save priancho/dad8603e648ce1d5c4f8528cd113ed45 to your computer and use it in GitHub Desktop.
MariaDB Galera cluster my.cnf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -----------------------# | |
# ----- References ----- # | |
# -----------------------# | |
# | |
# * Options for Galera cluster | |
# ------------------------------------------ | |
# https://mariadb.com/kb/en/mariadb/galera-cluster/ | |
# http://galeracluster.com/documentation-webpages/index.html | |
# https://www.digitalocean.com/community/tutorials/how-to-configure-a-galera-cluster-with-mariadb-10-1-on-ubuntu-16-04-servers | |
# | |
# * Character-sets and collations | |
# ------------------------------------------ | |
# https://mariadb.com/kb/en/mariadb/setting-character-sets-and-collations/#example-changing-the-default-character-set-to-utf-8] | |
# https://mariadb.com/kb/en/mariadb/supported-character-sets-and-collations/ | |
# | |
[client] | |
default-character-set=utf8 | |
socket=/var/lib/mysql/mysql.sock | |
[mysql] | |
default-character-set=utf8 | |
[mysqld] | |
datadir=/var/lib/mysql/data | |
socket=/var/lib/mysql/mysql.sock | |
bind-address=0.0.0.0 | |
log-bin=mariadb_galera.bin | |
binlog_format=ROW | |
default-storage-engine=innodb | |
innodb_autoinc_lock_mode=2 | |
innodb_flush_log_at_trx_commit=0 | |
innodb_buffer_pool_size=256M | |
# char-set | |
collation-server = utf8_unicode_ci | |
init-connect='SET NAMES utf8' | |
character-set-server = utf8 | |
# replication configuration | |
wsrep_on=ON | |
wsrep_sst_method=rsync | |
wsrep_provider=/usr/lib/galera/libgalera_smm.so | |
wsrep_cluster_name="galera_cluster" | |
wsrep_cluster_address="gcomm://master01,master02,master03" | |
#wsrep_node_address="this_node_ip" | |
#wsrep_node_name="this_node_name" | |
[mysql_safe] | |
log-error=/var/log/mysqld.log | |
pid-file=/var/run/mysqld/mysqld.pid | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Tips - change datadir to somewhere having enough space.