Configuring a replication master

In this recipe, we will configure a master. Once configured, a replication master can have as many slaves as required connecting to it and retrieving its binary log.

Getting ready

The process of setting up a master is as follows:

  • Configure a replication user account, with restricted permissions, for slaves to use when they log in
  • Configure the master to start recording information into a binary log (using row-based, statement-based or hybrid-based replication modes)

How to do it...

We will firstly cover the parameters that must be set in the [mysqld] section in /etc/my.cnf on the master node.

  1. Configuring a node ID

    Every server involved in a replication agreement with any other server must have a unique ID, set in my.cnf ...

Get High Availability MySQL Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.