Book Image

Mastering MariaDB

By : Federico Razzoli
Book Image

Mastering MariaDB

By: Federico Razzoli

Overview of this book

Table of Contents (19 chapters)
Mastering MariaDB
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Configuring replication


In this section we will see which configuration parameters are required on the master and slave servers.

All the following explanations also apply to the multisource replication environments. However, there are some differences that will be explained after the common tasks.

Setting up a replication environment requires at least the following steps:

  1. Configuring a new replication master

  2. Configuring one or more replication slave

  3. Loading data from the master

  4. Starting the slave

  5. Checking if the slaves are running

These tasks, along with other useful topics, will be explained in this section.

Configuring a new replication master

When setting up a replication environment, the first thing to do is of course to set up at least one master. This is an easy task, as the master is just a normal MariaDB server that has a unique ID and maintains a binary log.

First, a server ID needs to be set on all masters and slaves. The server ID needs to be unique. It must be an integer value of 4 bytes...