Page 1 of 1

replication in both ways?

Posted: Mon 02 Jul 2007 17:00
by Prismax
Hello,

I have this situation.

A central mysql database is located somewhere on a hosting partner's space. I've developed a desktop application to communicate with that mysql database. The users should be able to work anywhere, so the desktop application always connects to that online mysql database (through mydac).

But as the database grows, I'm suffering some performance problems. Therefore I would like to introduce some kind of replication so that all users can work locally and the central DB is always synchronized when a user changes something.

I've read about replication and it says that there'll always be a master and a slave DB, but I want actually both ways to be "master"... I mean : when a user starts up the program it should connect to the online DB to sync the local DB so that it's exactly the same and the user can start working normally. But when he closes down the tool, the same has to happen but in the other direction, so that the central DB is aware of the changes the user has done. To avoid problems this sync has to happen like every 5 minutes (the policy will be : first update the central DB with the changes made locally and then the other way around). How can I achieve this both-way replication?

Or is there any other way - using CRLab comps - to achieve this?

Posted: Tue 03 Jul 2007 09:23
by Antaeus
I found this topic in MySQL Reference Manual. I think, the "Dual master" chapter should help you in solving this problem.

If MySQL Replication will not solve this problem, you can try to make yourself an application that carries out replication. The CRBatchMove component of MyDAC will be useful in this case.

One more way is to search for other tools among third party ones.