On Thu, May 31, 2001 at 09:18:48PM +0200, Warren van der Merwe wrote:
> Hi there
> 
> I have three sites, each runnin MYSQL. I want to replicate the data
> between all three. I know I cannot do this with the standard
> replication in MYSQL, because all three sites will add their own
> records and the manual says the slave cannot insert entries it's
> self.

Actually, you can do that with replication. You just have to get it
right. :-)

Think of it as a replication ring. Imagine 3 servers: A, B, and C.

B is a slave of A.
C is a slave of B.
A is a slave of C.

You can insert a record into one, and it will make it to the other
two. The server-id in the binary log prevents this setup from causing
an infinite loop.

The trick is making sure that you don't have inserts which try to
stomp on each other. Generally this means that you can't use
AUTO_INCREMENT columns without taking extra precautions. You need to
ensure that server A can't generate the same ID that any other server
would generate.

If this isn't obvious (not sure how much you already know about
replication), just say so. We can go into more detail.

Jeremy
-- 
Jeremy D. Zawodny, <[EMAIL PROTECTED]>
Technical Yahoo - Yahoo Finance
Desk: (408) 349-7878    Fax: (408) 349-5454    Cell: (408) 439-9951

MySQL 3.23.29: up 6 days, processed 41,479,099 queries (73/sec. avg)

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to