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

    Eve ry server involved in a replication agreement with any other server must have a unique ID, set in ...

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

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.