Set Up MySQL/MariaDB Master-Slave Replication

MySQL Master-Slave replication allows for data to be automatically copied to multiple computers. Changes are made to the designated “master” node and replicated to one or more designated “slave” nodes for read-only applications.

This tutorial provides step-by-step instructions for setting up a MySQL/MariaDB master-slave database configuration. CentOS 8 and MariaDB 10.5 are used in this example.

Two servers are used in this tutorial, db01 (the master node) and db02 (the slave node). If you already have a database running on the master node, you must dump and restore a backup of the database into the slave node prior to enabling replication.

Read more Set Up MySQL/MariaDB Master-Slave Replication