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

Is it possible to setup CouchDB like replication for MySQL?

  • Replication to be initiated from an web application.
  • Replication should be a two way process. i.e. Synchronization
  • If there is a failure in network connection, replication should take over where it left.
  • Schronization should be incremental.
  • The kind of data stored is Invoice.
  • Syncronization should be atomic. Either it should copy the whole invoice OR nothing.

Should I go for an custom synchronization logic here? I am planning to use Hibernate for data storage.

share|improve this question

You can configure MySQL in Master-Master mode in an active-passive configuration. One server will serve as the master while the other one stays in sync as a slave of the master (plain MySQL Replication is asynchronous in nature, btw). The secondary acts as the master of the primary, but since it's not being written to, nothing actually gets written back to the master in this case. If the primary fails, you can start using the secondary one as the main master (ie: point your app to it). Eventually when you fix the master, assuming all the data and configuration was intact, you can re-establish replication and it can pick up where it left off.

Check out the Multi-Master Replication Manager project that can help you achieve this:

Good luck!

share|improve this answer
My goal is to use it for offline distributed application. Will Multi-Master replication help? – user39184 Aug 30 '10 at 18:17
No, MySQL does not support distributed configurations. You can always shard your data, but this is extremely complex and generally not recommended. MySQL is much more like a RDBMS that CouchDB is. – vmfarms Aug 30 '10 at 18:36
And also, MySQL Replication can't be setup from a web interface. It needs to be configured on the server directly. – vmfarms Aug 30 '10 at 18:36

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.