I'm developing a software in Microsoft Blend and I need it to be synchronized with my online server MySQL database. I have local MySQL database which I use for the app. The app also have an online version in PHP with a MySQL database. So the user can enter either by the online version or offline app. So I need both the databases to be synchronized so when a data is entered online it will be reflected in the software app. I need separate databases because when the app is not connected to internet, it should work perfectly and when reconnected it should start synchronization both ways i.e. from local to online and from online to local database.

So basically I need 2 MySQL databases to be synchronized both ways where one is local and other online.

Also how to find out when a synchronization breaks?

  • Read about database replication. Scenario you need is master-master.
    – N.B.
    Commented Mar 27, 2012 at 12:17
  • @N.B. I read about it. But that is not what i need. The thing i need is not a backup that has the same contents as the first database. Each database is dealt seperately and should be synchronized in bothways i.e Contents in master 1 that are not in master 2 should be inserted or updated and vice-versa... (The page i read -> howtoforge.com/mysql_master_master_replication )
    – hablema
    Commented Mar 27, 2012 at 12:25
  • Replication isn't used exclusively for backups, it's used to synchronize databases as well (among other things). If you have your local database use even numbers for auto_increments and your online one to use odd numbers for auto_increments, you avoid clashes and both databases will replicate onto each other. That's the point of master-master, so you can use both, not have one as a backup.
    – N.B.
    Commented Mar 27, 2012 at 12:38
  • Have a look at Schema and Data comparison/synchronization tools in dbForge Studio for MySQL - devart.com/dbforge/mysql/studio
    – Devart
    Commented Mar 28, 2012 at 6:15
  • If you're looking for "High Availability", you should look into Asynchronous Replication. Here's a good article on it: clusterdb.com/mysql-cluster/… Commented Jun 27, 2012 at 16:25

1 Answer 1


Schedule a job to backup one database and apply the backup script to another, that way you never need to worry about the synchronization as it is done automatically on a schedule

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.