For example, say you have a database that exists on two servers, with replicated data consisting of one table and four records, which I'll call A, B, C and D.
If server 1 only ever updates records A and B, and server 2 only ever updates C and D, then there is no issue with multimaster replication.
The issue is conflict resolution. In the example above, say record A was updated on server 1 at the same time record A was updated on server 2. Which change is correct? What if the conflict was not so trivial, but involved records on multiple tables with auto-incremented primary keys and foreign key constraints to other records inserted or updated at the same time? You could end up with a real mess.
Some other database vendors do offer multimaster replication (Oracle being the big one), but I've heard that even their conflict resolution algorithms are not perfect.
In your case, you need to ensure that the same record is not being updated (or deleted) on one database at the same time it is being accessed on another database. You have to figure out how to do that yourself, and implement it in whatever application is talking to the database(s). MySQL can't do it for you, at least not right now.
Have you considered having read-only databases at the remote locations, and a single master that people write to which in turn sends changes to the 4 read-only databases?
David
Jim Grill wrote:
Two way replication is possible. However, it does not work like you think it would. It would not be safe to modify data on both databases at the same time. See the FAQ on replication: http://dev.mysql.com/doc/mysql/en/Replication_FAQ.html
There is some information regarding two-way replication that will shed some light on the subject.
Jim Grill
http://lists.mysql.com/[EMAIL PROTECTED]yeah, I seen that have. Have you tried that before? I need to do it two-way. But have not seen any special setup for that. Each site will be entering data and all sites will need to see the updated change.
On Fri, 01 Oct 2004 10:38:07 -0400, Michael Stassen
<[EMAIL PROTECTED]> wrote:
--Have you considered replication <http://dev.mysql.com/doc/mysql/en/Replication.html>?
Michael
spiv007 wrote:
I want to know what to best way to keep a 4 mysql servers sync.
I have 4 remote locations, I am thinking about putting a mysql server in each location and every hour have the 1 db that I need to sync to sync together.
Is there away to do its in somewhat real time or even a delay maybe of an hour or two?
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]