MariaDB Galera Cluster

= Introduction = This is a guide for 3 node MariaDB Galera Cluster.

MariaDB Galera cluster required a minimal of 3 node setup. However in this guide will only stop at 2 and you can add your new node later.

= Design = The Maria Galera Cluster are multi master cluster which have synchronous write across all node. Basically each node required an static ip address for it to function

If you have a local dns server, you can make use of that. else make use of your hosts file. This will make your system clear about the other nodes and ip address.

= Packages = Please add the garbd useflah, if you have 3 node, you can skip this useflag.

Please emerge the following package

= Database Initialization = Run this command and keyin your mariadb root password

= Setup Mariadb and Galera =

Start mariadb on Node1
If everything is running smoothly, start the next node and on.

Checking if all node are join and running correctly
try to run this command from node 1

If the cluster size is equal to you node size you are good to go. And wsrep_ready meant the cluster is ON.

Garbd Configuration--Not working yet
= Finalize configuration = The Mariadb cluster is now up. We still need to make some final change.

Add services using rc-update on all node
= Secure mariadb = Secure your mariadb for production use

= External Reference =