content_image/680119.jpg
1. On the source, execute: 

SHOW MASTER STATUS; 

Note down the values in the File  and Position  column. 

2. On every replica, use the file and position information from the source to execute: 

SELECT MASTER_POS_WAIT(file, position); 

If you have a source and multiple levels of replicas, or in other words you have replicas of replicas, repeat step 2 on each level, starting from the source, then all the direct replicas, then all the replicas of replicas, and so on. 

If you use a circular replication topology where multiple servers may have write clients, perform step 2 for each source-replica connection, until you have completed the full circle. Repeat the whole process so that you do the full circle twice . 

For example, suppose you have three servers A, B, and C, replicating in a circle so that A -> B -> C -> A. The procedure is then: 

## 17.1.5 MySQL Multi-Source Replication 

•Do step 1 on A and step 2 on B. 

•Do step 1 on B and step 2 on C. 

•Do step 1 on C and step 2 on A. 

•Do step 1 on A and step 2 on B. 

•Do step 1 on B and step 2 on C. 

•Do step 1 on C and step 2 on A. 

MySQL multi-source replication enables a replica to receive transactions from multiple immediate sources in parallel. In a multi-source replication topology, a replica creates a replication channel for each source that it should receive transactions from. For more information on how replication channels function, see Section 17.2.2, “Replication Channels” . 

You might choose to implement multi-source replication to achieve goals like these: 

•Backing up multiple servers to a single server. 

•Merging table shards. 

•Consolidating data from multiple servers to a single server. 

Multi-source replication does not implement any conflict detection or resolution when applying transactions, and those tasks are left to the application if required. 

<img src='content_image/680119.jpg'>

## Note 

Each channel on a multi-source replica must replicate from a different source. You cannot set up multiple replication channels from a single replica to a single source. This is because the server IDs of replicas must be unique in a replication topology. The source distinguishes replicas only by their server IDs, not by the names of the replication channels, so it cannot recognize different replication channels from the same replica. 

