Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

1 Answer 1

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

 
discard

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.