Quantcast
Channel: StackExchange Replication Questions
Viewing all articles
Browse latest Browse all 17268

MySQL Multi-source - Single Slave Setup. Adding Unique Master ID on Master's tables definition

$
0
0

this is a design question.

I understand that Replication, is like mirroring. So this would mean, whats on the master, should be mirrored on the slave. (Is this always the case, like strictly same schema definitions for master and slave?)

In this setup, I have multiple Master DBs where data would be coming from and be pouring down a single Slave DB. There would definitely be a case of ID clashing that would happen. What are your thoughts to avoid this?

These are my initial ideas: 1. Add Master ID column (that represents a specific Master DB, unique from the other Master DBs.) on each table (or tables that I need replicated) of Master DBs. 2. Or have the Unique Master ID column present on the Slave only. IF, there is a way to add custom behavior on replication process that would retrieve the unique ID of a Master DB and place it on the Unique Master ID column.

Thanks in Advanced~


Viewing all articles
Browse latest Browse all 17268

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>