Setup MariaDB (Master-Slave) Replication in CentOS/RHEL 7 and Debian 8

In this article we will explain how to set up master-slave replication in MariaDB 10.1. As opposed to classic replication, MariaDB introduced the concept of Global Transaction IDs (GTIDs) in v10.0, which allows to change a slave to connect to and replicate from a different master easily.