Setting the Replication Master Configuration
On a replication master, you must enable binary logging and establish a unique server ID. If this has
not already been done, this part of master setup requires a server restart.
Binary logging must be enabled on the master because the binary log is the basis for sending data
changes from the master to its slaves. If binary logging is not enabled, replication will not be possible.
Each server within a replication group must be configured with a unique server ID. This ID is used to
identify individual servers within the group, and must be a positive integer between 1 and (232)-1. How
you organize and select the numbers is entirely up to you.
To configure the binary log and server ID options, you will need to shut down your MySQL server and
edit the my.cnf or my.ini file. Add the following options to the configuration file within the [mysqld]
section. If these options already exist, but are commented out, uncomment the options and alter them
according to your needs. For example, to enable binary logging using a log file name prefix of mysqlbin,
and configure a server ID of 1, use these lines:
[mysqld]
log-bin=mysql-bin
... zobacz całą notatkę
Komentarze użytkowników (0)