Spec-Zone .ru
спецификации, руководства, описания, API

16.1.4.3. Replication Slave Options and Variables

This section describes the server options and system variables that apply to slave replication servers. You can specify the options either on the command line or in an option file. Many of the options can be set while the server is running by using the CHANGE MASTER TO statement. You can specify system variable values using SET.

Server ID. On the master and each slave, you must use the server-id option to establish a unique replication ID in the range from 1 to 232 – 1. "Unique" means that each ID must be different from every other ID in use by any other replication master or slave. Example my.cnf file:

[mysqld]server-id=3

Startup options for replication slaves. The following list describes startup options for controlling replication slave servers. Many of these options can be set while the server is running by using the CHANGE MASTER TO statement. Others, such as the --replicate-* options, can be set only when the slave server starts. Replication-related system variables are discussed later in this section.

Obsolete options. The following options are removed in MySQL 5.6. If you attempt to start mysqld with any of these options in MySQL 5.6, the server aborts with an unknown variable error. To set the replication parameters formerly associated with these options, you must use the CHANGE MASTER TO ... statement (see Section 13.4.2.1, "CHANGE MASTER TO Syntax").

The options affected are shown in this list:

System variables used on replication slaves. The following list describes system variables for controlling replication slave servers. They can be set at server startup and some of them can be changed at runtime using SET. Server options used with replication slaves are listed earlier in this section.

Options for logging slave status to tables. MySQL 5.6 and later supports logging of replication slave status information to tables rather than files. Writing of the master info log and the relay log info log can be configured separately using two server options added in MySQL 5.6.2 and listed here:

The info log tables and their contents are considered local to a given MySQL Server. In MySQL 5.6.9 and later, they are not replicated, and changes to them are not written to the binary log. (Bug #14741537)

For more information, see Section 16.2.2, "Replication Relay and Status Logs".