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?
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.