Documentation Home
MySQL Replication
Related Documentation Download this Excerpt
PDF (US Ltr) - 1.4Mb
PDF (A4) - 1.4Mb
HTML Download (TGZ) - 365.3Kb
HTML Download (Zip) - 379.7Kb


MySQL Replication  /  ...  /  Adding a GTID Based Master to a Multi-Source Replication Slave

2.4.2.2 Adding a GTID Based Master to a Multi-Source Replication Slave

This section assumes you have enabled GTID based transactions on the master using gtid_mode=ON, enabled a replication user, and ensured that the slave is using TABLE based replication repositories. Use the CHANGE MASTER TO statement to add a new master to a channel by using a FOR CHANNEL channel clause. For more information on replication channels, see Section 5.3, “Replication Channels”

For example, to add a new master with the host name master1 using port 3451 to a channel called master-1:

CHANGE MASTER TO MASTER_HOST='master1', MASTER_USER='rpl', MASTER_PORT=3451, MASTER_PASSWORD='', \
MASTER_AUTO_POSITION = 1 FOR CHANNEL 'master-1';

Multi-source replication is compatible with auto-positioning. See CHANGE MASTER TO Syntax for more information.

Repeat this process for each extra master that you want to add to a channel, changing the host name, port and channel as appropriate.


User Comments
User comments in this section are, as the name implies, provided by MySQL users. The MySQL documentation team is not responsible for, nor do they endorse, any of the information provided here.
Sign Up Login You must be logged in to post a comment.