FAQ
Hi,

I have one master A , and two slaves B and C both replicate A.

Now I want to change A and B as master to master replication. I know how to setup A and B. I'm not sure if I need to do any change on C, in order it execute all statements once and won't miss any statements. For example, updates on A, and updates original done on B, but replicated/executed on A.

Thanks,
Lisa

Search Discussions

  • Marcus Bointon at Mar 7, 2010 at 9:26 pm

    On 7 Mar 2010, at 22:04, Database System wrote:

    I have one master A , and two slaves B and C both replicate A.

    Now I want to change A and B as master to master replication. I know how to setup A and B. I'm not sure if I need to do any change on C, in order it execute all statements once and won't miss any statements. For example, updates on A, and updates original done on B, but replicated/executed on A.

    You need to enable logging of slave updates on A as otherwise writes on B will propagate to A, but not to C. Writes to A will work ok and propagate to C anyway (as they are already).

    Marcus
    --
    Marcus Bointon
    Synchromedia Limited: Creators of http://www.smartmessages.net/
    UK resellers of info@hand CRM solutions
    marcus@synchromedia.co.uk | http://www.synchromedia.co.uk/
  • Mats Kindahl at Mar 8, 2010 at 8:46 pm

    Database System wrote:
    Hi,

    I have one master A , and two slaves B and C both replicate A.

    Now I want to change A and B as master to master replication. I know how to setup A and B. I'm not sure if I need to do any change on C, in order it execute all statements once and won't miss any statements. For example, updates on A, and updates original done on B, but replicated/executed on A.
    Hi Lisa,

    I'm not sure what problem you're trying to solve, but replication
    between A and B will work since A will prune any events tagged with
    its server ID. For events that originate from C you have to be careful
    since those events will not be pruned by any server if they get into
    the loop between A and B.

    Note that you cannot replicate from two masters at the same time
    (unless you resort to various tricks), so you have to re-direct the A
    and B server to each others. If you are too quick in re-directing the
    A and B servers, it might be that there are C events in the binlog for
    either A or B, and they will then circle forever, and being executed a
    lot of times.

    Just my few cents,
    Mats Kindahl
    Thanks,
    Lisa


    --
    Mats Kindahl
    Senior Software Engineer
    Database Technology Group
    Sun Microsystems
  • Database System at Mar 9, 2010 at 6:58 pm
    Is there anybody has done what I'm trying to do?
    I successfully setup master to master replication between A and B. Now I'd likr to add C to replicate A, mean A is also master of C. I need to make sure updates on B will also indirect replicated to C.

    Thanks,
    Lisa

    --- On Mon, 3/8/10, Mats Kindahl wrote:
    From: Mats Kindahl <mats@sun.com>
    Subject: Re: Addutional slave to a master-to-master replication
    To: database100@yahoo.com
    Cc: replication@lists.mysql.com
    Date: Monday, March 8, 2010, 2:36 PM


    Database System wrote:
    Hi,

    I have one master A , and two slaves B and C both
    replicate A.
    Now I want to change A and B as master to master
    replication. I know how to setup A and B. I'm not sure if I
    need to do any change on C, in order it execute all
    statements once and won't miss any statements. For example,
    updates on A, and updates original done on B, but
    replicated/executed on A.

    Hi Lisa,

    I'm not sure what problem you're trying to solve, but
    replication
    between A and B will work since A will prune any events
    tagged with
    its server ID. For events that originate from C you have to
    be careful
    since those events will not be pruned by any server if they
    get into
    the loop between A and B.

    Note that you cannot replicate from two masters at the same
    time
    (unless you resort to various tricks), so you have to
    re-direct the A
    and B server to each others. If you are too quick in
    re-directing the
    A and B servers, it might be that there are C events in the
    binlog for
    either A or B, and they will then circle forever, and being
    executed a
    lot of times.

    Just my few cents,
    Mats Kindahl
    Thanks,
    Lisa


    --
    Mats Kindahl
    Senior Software Engineer
    Database Technology Group
    Sun Microsystems

    --
    MySQL Replication Mailing List
    For list archives: http://lists.mysql.com/replication
    To unsubscribe:    http://lists.mysql.com/replication?unsub=database100@yahoo.com
  • Marcus Bointon at Mar 9, 2010 at 11:27 pm

    On 9 Mar 2010, at 19:58, Database System wrote:

    I successfully setup master to master replication between A and B. Now I'd likr to add C to replicate A, mean A is also master of C. I need to make sure updates on B will also indirect replicated to C.
    Yes, as I said in my first reply - you just need to enable logging of slave updates on A (which is a slave to B) otherwise C will not receive those updates. See here for details: http://dev.mysql.com/doc/refman/5.0/en/replication-options-slave.html#option_mysqld_log-slave-updates

    Marcus
    --
    Marcus Bointon
    Synchromedia Limited: Creators of http://www.smartmessages.net/
    UK resellers of info@hand CRM solutions
    marcus@synchromedia.co.uk | http://www.synchromedia.co.uk/

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupreplication @
categoriesmysql
postedMar 7, '10 at 9:04p
activeMar 9, '10 at 11:27p
posts5
users3
websitemysql.com
irc#mysql

People

Translate

site design / logo © 2022 Grokbase