Working in Progress
Setup MariaDB Galera Cluster
The setup for Galera Cluster is reasonably easy if you follow the instructions in this article.
!!!IMPORTANT!!!
Initializing cluster
On setups on CentOS 7 with MariaDB 10.1.10, please usegalera_new_cluster
to start the first node.systemctl start mysql --wsrep-new-cluster
will give you the unrecognized option error.Shutdown and restart entire cluster
Shutdown all the nodes normally usingsystemctl stop mysql
Restart is a bit complicated, it involves following steps:Find the node with the most advanced sequence number
cat /var/lib/mysql/grastate.dat
On the node with the most advanced seq number, start it using
galera_new_cluster
- Start the rest of the nodes as normal
systemctl start mysql
Setup HAProxy
The setup for HAProxy is also fairly easy with the instructions.
!!!IMPORTANT!!!
- Allow firewall to pass tcp port used by
clustercheck
on every Cluster Node. - Define
timeout connect, timeout client, timeout server
under eachlisten
directive. - Use
bind
insidelisten
directive, instead of putting0.0.0.0:xxxx
directly afterlisten