Storing changes to multiple databases in a single centralized database

Posted by B4x on Server Fault See other posts from Server Fault or by B4x
Published on 2009-09-29T09:51:48Z Indexed on 2010/04/28 6:03 UTC
Read the original article Hit count: 315

Filed under:
|

The setup: multiple MySQL databases at different locations with the same scheme. The databases are in production.

The motivation: we want to present information in these databases in a web interface, clearly showing which database the row originated from. We want to be able to get this data from one single source (for different reasons, one of them is pagination which gets tricky if you use multiple sources).

The problem: how do we collect data from multiple databases, storing it at a central location and clearly marking the origin of each row? We have discussed using a centralized DB that tracks changes to the production DBs, with the same schema and one additional column for origin. If possible, we would like to avoid having to make changes in the production environment.

Since we can't use MySQL's replication (multiple masters to a single slave isn't allowed), what are our other options? Are there any existing solutions for something like this or do we have to code something ourselves? Is the best solution to change the database schemas in production and add a column for origin?

The idea of a centralized database isn't set in stone. If there is a solution to this that solves our other problems without a centralized DB, we can be flexible.

Any help is much appreciated.

© Server Fault or respective owner

Related posts about database

Related posts about mysql