Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

All over the internet I can find manuals on how to replicate databases from master(s) to slaves.

What I need is to continuously keep a copy of table from 5 different servers in sync.

We have one application running at 5 locations. We need to have a copy of the system_log table from every one of those 5 servers always in sync on one new server at our 'headquarters'.

What is the best way to achieve this without using custom scripts?

share|improve this question
    
I have a possible solution for this that can be implemented without any 3rd party tools... but it would help me to know whether you need all of the "system_log" records from the multiple sites to converge into the same table on the central master? Or would separate tables on the central master (one from each site) also work? –  Michael - sqlbot Sep 28 '12 at 19:54

3 Answers 3

Sorry. If you are trying to have many Masters and one Slave -- that is not supported. (Some third party addons may have such.) It is better to have the 5 servers all write to the 'headquarters' Master. Network latencies are probably not a serious problem.

share|improve this answer

I would recommend looking at circular replication, where all servers are connected in a ring, and each server is slave to previous and master to the next, so any change in 1 replicates all the way through the ring. I've used this at my work to link 3 servers (one external webserver, 1 internal US wamp server, 1 Asian office wamp server). It was fairly easy to set up and the only problems I've had was when the asian office was not reachable for 2 whole days due to widespread internet outage in the area. As soon as it came back up, the replication resumed.

These 2 links were particularly helpful for me:

http://onlamp.com/onlamp/2006/04/20/advanced-mysql-replication.html

http://www.cwik.ch/2011/03/setting-up-multi-master-circular-replication-with-mysql/

as was the replication chapter of High Performance MySQL: Optimization, Backups, and Replication, which also had some different replication schemes you might find interesting if circular is not suited for your needs.

share|improve this answer

Maybe, you can write in master server the data and replicate to the 5 slaves. In central node you write 'system_log' and mysql reply your data to slaves servers.

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.