Created
May 8, 2025 22:45
-
-
Save loveJesus/aba28f18da547dcd6416b4bdc83eb926 to your computer and use it in GitHub Desktop.
60-galera.cnf mariadb hallelujah
This file contains hidden or 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
# For God so loved the world, that He gave His only begotten Son, that all who believe in Him should not perish but have everlasting life. | |
# * Galera-related settings | |
# | |
# See the examples of server wsrep.cnf files in /usr/share/mariadb | |
# and read more at https://mariadb.com/kb/en/galera-cluster/ | |
[mysqld] | |
binlog_format = ROW | |
log_bin = /var/log/mysql/mariadb-bin-chirho # Or your preferred location for binary logs | |
log_bin_index = /var/log/mysql/mariadb-bin-chirho.index # Or your preferred location for binary logs | |
log_slave_updates = ON # Enable if a node might also act as a slave in another replication setup (not just Galera) | |
server_id = 102 # << UNIQUE ID | |
wsrep_gtid_mode = ON | |
wsrep_gtid_domain_id = 0 | |
gtid_domain_id = 1 # We will set this per-node (can be the same for all cluster nodes, or unique if desired for specific complex topologies) | |
bind-address = 0.0.0.0 | |
[galera] | |
# Mandatory settings | |
wsrep_on = ON | |
wsrep_cluster_name = "galera_chirho" # Choose a descriptive name for your cluster | |
wsrep_node_address = "2.2.2.2" # This server's actual IP or resolvable hostname | |
wsrep_node_name = "gal2_chirho" | |
wsrep_cluster_address = "gcomm://1.1.1.1,2.2.2.2,3.3.3.3" | |
wsrep_sst_receive_address = "2.2.2.2:4444" | |
wsrep_sst_method = mariabackup # or mariabackup, xtrabackup-v2. 'mariabackup' is recommended if available. | |
bind-address = 0.0.0.0 | |
binlog_format = row | |
default_storage_engine = InnoDB | |
innodb_autoinc_lock_mode = 2 | |
wsrep_provider = /usr/lib/galera/libgalera_smm.so | |
wsrep_sst_auth = sst_user_chirho:redacted_chirho # Create this user with RELOAD, PROCESS, LOCK TABLES, REPLICATION CLIENT privileges. | |
# GRANT RELOAD, PROCESS, LOCK TABLES, REPLICATION CLIENT ON *.* TO 'sst_user_chirho'@'localhost' IDENTIFIED BY 'redacted_chirho'; | |
# GRANT RELOAD, PROCESS, LOCK TABLES, REPLICATION CLIENT ON *.* TO 'sst_user_chirho'@'%' IDENTIFIED BY 'redacted_chirho'; | |
# FLUSH PRIVILEGES; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment