Online/Offline Database Synchronization - MySQL/PHP

前端 未结 2 697
走了就别回头了
走了就别回头了 2020-12-13 15:53

I am developing a web application using php and mysql. This application runs on three different locations.

  1. On internet
  2. Head office
  3. Branch off
相关标签:
2条回答
  • 2020-12-13 16:03

    I'm using SymmetricDS to synchronize databases. It is capable of synchronizing or replicating data between nodes (servers/databases), only pushing or pulling the data you define. It is a software based on Java, it has a steep learning curve, but it really does the job.

    SymmetricDS can be set up to push changes from one node to the two other nodes, thus making sure that all three nodes contains the same data. You need to make sure that primary keys are unique keys, and not auto incremented values assigned by the database as this most likely will be an issue across the three different databases you'd like to synchronize.

    The software installs triggers on the database, and captures changes when INSERT, UPDATE or DELETE (and other) operations are carried out. These data changes are then invoked on the other nodes. The software needs to run on each location, but does not need an internet connection that is available at all times.

    I did worry in the beginning that triggers on all my tables would slow down performance, but this has not been a problem at all. I can't say that we've discovered any issues with performance after the triggers were installed.

    Have a look at http://symmetricds.org/ for more details.

    0 讨论(0)
  • 2020-12-13 16:03

    Try Schema and Data Comparison tools in dbForge Studio for MySQL.

    We also have stand-alone tools:

    • dbForge Data Compare
    • dbForge Schema Compare
    0 讨论(0)
提交回复
热议问题