How to keep two or more databases synced?
Use cases
Laptop <--> Home PC - working on both boxes and editing on both
Approaches
-
you can set up a circular replication system, but it's quite tricky- The problem here is making sure one doesn't do an insert in two different servers that may conflict. The particular problem would have to do with unique indices. Auto-increment would be an obvious problem. You wouldn't have to have a minimum of 3 servers, it would work with two. It would take some fancy code to handle any conflicts, or one could make sure that conflicting updates couldn't occur by only allowing updates to a particular table in one server (best done by permission setting.) I don't see the particular advantage to this either. Additionally MySQL doesn't handle referential integrity very well.
-
Resources
-
http://www.navicat.com/shareware.php3 - Navicat� (Linux) is a powerful MySQL database administration tool. Navicat provides a powerful set of tools that are sophisticated enough for professional developers, yet easy to learn for new users. - 30days trial
German
-
http://www.mysync.de/anleitung.html - MySync - ein Tool zum Synchronisieren einer Web-MySQL mit einer Client-MySQL Datenbank - 'Windows only??'