-
Book Overview & Buying
-
Table Of Contents
High Availability MySQL Cookbook
By :
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.
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)
We will firstly cover the parameters that must be set in the [mysqld] section in /etc/my.cnf on the master node.
Configuring a node ID
Every server involved in a replication agreement with any other server must have a unique ID, set in my.cnf with the server-id parameter:
server-id = 1
Configuring a binary log
The master must be told to store a binary log. The parameter log-bin will do this, but it is a good idea to pass a name for this logfile.
If you fail to do so, it can cause...
Change the font size
Change margin width
Change background colour