![](http://1.bp.blogspot.com/-W5u0auBEGZQ/Xlj62JHjEuI/AAAAAAAASeQ/YgB6eV6GAGE6tg9iy3YlVwTQkrlHQlyEQCLcBGAsYHQ/s1600/mysql_master_master_replication.png)
Database clustering is particularly useful for highly active website and application. With replication, at least two or more MySQL servers act as a cluster. MySQL multi-node circular replication adds speed and redundancy.
This tutorial is written for Ubuntu 18.04.4, 19.04, 19.10 or Debian 9 using a non-root user, which means commands that require elevated privileges are prefixed with sudo.
We will use following three servers to configure MySQL database multi-node circular replication cluster using HAProxy and Heartbeat.
HOSTNAME | IP ADDRESS | PURPOSE |
dbserver1 | 192.168.10.1 | MySQL |
dbserver2 | 192.168.10.2 | MySQL |
dbserver3 | 192.168.10.3 | MySQL |
If you wish you can watch below video tutorial to set up your replication cluster quickly.
Prerequisites
You will need three (physical or virtual) machines with Ubuntu 18.04.4 server installed on each machine having sudo non-root user privileges. When you have prerequisites in place, please follow this step by step tutorial to set up a multi-node MySQL replication cluster for your production environment.