Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Strategy on synchronizing database from multiple locations to a central database and vice versa

I have several databases located in different locations and a central database which is in a data center. All have the same schema. All of them are changed(insert/update/delete) in each location with different data including the central database.

I would like to synchronise all the data in the central database. I would also like all data in the central database synchronise to all locations. What I mean is that database change in location 1 should also be reflected in location 2 database.

Any ideas on how to go about this?

like image 201
ian Avatar asked Jan 26 '11 13:01

ian


3 Answers

Just look at SymmetricDS. It is a data replication software that supports multiple subscribers and bi-directional synchronization.

like image 147
Sunil Avatar answered Oct 20 '22 14:10

Sunil


You will have to implement a two-way replication scheme between the databases. Every new record created should have a unique identifier (eg. a GUID), so that data from the different databases does not conflict. (See the mysql replication howto).

MySql only supports one-way replication, so you will need to set up each database as a master, and make each database a slave of all the other database instances. Good luck with that.

like image 39
RobinG Avatar answered Oct 20 '22 12:10

RobinG


I went to SymmetricDS

I think it is the top quality also just to mention I found in sourceforge (php mysql sync)

and found many links on the internet.

like image 33
OliveNice Avatar answered Oct 20 '22 14:10

OliveNice