Related Documentation Download this Excerpt
PDF (US Ltr) - 1.1Mb
PDF (A4) - 1.1Mb
HTML Download (TGZ) - 279.3Kb
HTML Download (Zip) - 285.9Kb


MySQL Replication  /  ...  /  Setting the Replica Configuration

2.1.2 Setting the Replica Configuration

On a replica, you must establish a unique server ID. If this has not already been done, this part of replica setup requires a server restart.

If the replica server ID is not already set, or the current value conflicts with the value that you have chosen for the replication source server, shut down the replica server and edit the [mysqld] section of the configuration file to specify a unique server ID. For example:

[mysqld]
server-id=2

After making the changes, restart the server.

If you are setting up multiple replicas, each one must have a unique server_id value that differs from that of the source and from any of the other replicas.

Note

If you do not set server_id (or set it explicitly to its default value of 0), the replica refuses to connect to a source.

You do not have to enable binary logging on the replica for replication to be set up. However, if you enable binary logging on the replica, you can use the replica's binary log for data backups and crash recovery, and also use the replica as part of a more complex replication topology. For example, where this replica then acts as a source to other replicas.