Mariadb is drop in replacement for MySQL which was developed just after MySQL acquired by Oracle. Both Maria and My are named after daughter of its database developer. Clustering in Mariadb is very easy and straightforward. Currently, there are two releases of Mariadb, 5.5 which is stable version and 10.0 is development version. I installed the development version as,

OR i can select according to my OS version from this link

After installing, i created configuration for galera replication inside /etc/mysql/conf.d/cluster.cnf in my primary database server as

Then, now there is special user needed for synchronizing among cluster nodes in /etc/mysql/debian.cnf as

This debian.cnf should be copied to all nodes. After this much is done. Its time to make cluster active. First stop mysql services in all nodes including primary node.

Then, start primary node as ,

After that, i added other nodes as,

And, I started mysql in other nodes as well.


For troubleshooting, i usually do,

That’s it. MariaDB galera clustering is finally setup with master-master database replication.