Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have 10 MySQL servers and each one holds a database that needs to be replicated to a single, centralised MySQL server. The complexity is that each server must replicate its database to the same database on the centralised server, essentially creating a single, centralised database of aggregated data from all the individual servers. Although various tables do contain primary keys, these columns can be safely ignored, and do not need to be replicated to the centralized server. The database structure is identical on each server. What would be the best way to accomplish this?

share|improve this question

The standard way to do this is to assign an autoincrement columnn to each of these tables, and increment them by an interval - 10, in your case. Each server will use a unique offset into the interval, so server 1 will use IDs 1, 11, 21 etc, server 2 will use IDs 2, 12, 22, etc.

This ensure they will never overlap.

Then you only need to set up replication from each source server to the centralized aggregator and merge all records.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.