List:General Discussion« Previous MessageNext Message »
From:Rick James Date:May 3 2012 4:21pm
Subject:RE: using the bin-log approach on the master side, how can I
accomplish my replication objectives
View as plain text  
That surprise happens whether you filter it on the master or on the slave.  The problem is that some tables got updated; some did not.

The only viable workaround (that I know of) is to use the "wild" filtering -- this forces the filtering to actually look at the query, not simply use the USE.

> -----Original Message-----
> From: Nitin Mehta [mailto:ntnmht@stripped]
> Sent: Wednesday, May 02, 2012 9:25 PM
> To: Brown, Charles
> Cc: mysql@lists.mysql.com
> Subject: Re: using the bin-log approach on the master side, how can I
> accomplish my replication objectives
> 
> Hi Charles,
> I believe you would already have bin-log configured, is that right? If
> not, you need to.
> Secondly, If you think the bin-log generated for the entire stack of
> databases/schemas is too big, you may want to restrict it using
> "binlog-do-db" BUT that may create problem if you have any DMLs which
> run in the below manner:
> mysql> use db1;
> mysql> update db2.tb2 ....
> You may be surprised to find that this update will not be recorded in
> master's bin-log if you have set "binlog-do-db=db2".
> To sum it up, if you're not very sure, simply enable bin-log on master
> and use "replicate-do-table" on slave. So in one word response to your
> question, no!
> Hope that helps!
> Also, please reply to all so the people, helping you, know about the
> status of your problem.
> 
> 
> Regards,
> 
> 
> 
> ________________________________
>  From: "Brown, Charles" <CBrown@stripped>
> To: Nitin Mehta <ntnmht@yahoo.com>
> Sent: Thursday, May 3, 2012 9:27 AM
> Subject: RE: using the bin-log approach on the master side, how can I
> accomplish my replication objectives
> 
> 
> Hello Nitin,
> Help Me!  Using your approach, do I have to put anything on  the master
> “my.cnf”.
> 
> Thanks
> 
> 
> From:Nitin Mehta [mailto:ntnmht@yahoo.com]
> Sent: Wednesday, May 02, 2012 10:51 PM
> To: Brown, Charles; Rick James; a.smith@stripped;
> mysql@lists.mysql.com
> Subject: Re: using the bin-log approach on the master side, how can I
> accomplish my replication objectives
> 
> I guess, it only makes things even more simple.
> 
> You should use "replicate-do-table=db1.tb1" and so one in slave's cnf
> to ensure that only this particular table gets replicated. However, all
> the databases on master will get bin-logged and you may or may not want
> to do that.
> 
> So making it even simpler:
> 
> on the slave:
> 
> replicate-do-table=db1.tb1
> replicate-do-table=db2.tb2
> replicate-do-table=db3.tb3
> You might want to have a look at :
> http://dev.mysql.com/doc/refman/5.5/en/replication-options-
> slave.html#option_mysqld_replicate-do-table
> http://dev.mysql.com/doc/refman/5.5/en/replication-rules.html
> 
> Hope this helps!
> 
> From:"Brown, Charles" <CBrown@stripped>
> To: Rick James <rjames@stripped>; "a.smith@ukgrid.net"
> <a.smith@stripped>; "mysql@stripped" <mysql@stripped>
> Sent: Thursday, May 3, 2012 8:51 AM
> Subject: using the bin-log approach on the master side, how can I
> accomplish my replication objectives
> 
> Hello Rick,
> 
> I think I'll go with your recommendations - but help me here a little
> bit. Because all look fuzzy like a brain surgery. So make it simple and
> clean for me.
> 
> 
> 
> For the sake of simplicity, here is what my master has:
> 
> Database: db1
> 
> Tables: db1tb1, db1tb2, db1tb3
> 
> 
> 
> Database: db2
> 
> Tables: db2tb1, db2tb2, db2tb3
> 
> 
> 
> Database: db3
> 
> Tables: db3tb1, db3tb2, db3tb3
> 
> 
> 
> Now, I would like to replicate only these tables that belong to
> respective databases:
> 
> db1tb1, db2tb2, and db3tb3
> 
> 
> 
> My question is: using the bin-log approach on the master side, how can
> I accomplish my replication objectives? Help me
> 
> 
> 
> Best regards and thanks
> 
> 
> 
> 
> 
> 
> 
> ********************************************
> This message is intended only for the use of the Addressee and
> may contain information that is PRIVILEGED and CONFIDENTIAL.
> 
> If you are not the intended recipient, you are hereby notified
> that any dissemination of this communication is strictly prohibited.
> 
> If you have received this communication in error, please erase
> all copies of the message and its attachments and notify us
> immediately.
> 
> Thank you.
> ********************************************
> 
> 
> ********************************************
> This message is intended only
> for the use of the Addressee and
> may contain information that is PRIVILEGED
> and CONFIDENTIAL.
> If you are not the intended recipient, you are hereby notified
> that any
> dissemination of this communication is strictly prohibited.
> If you have received this communication in error, please erase
> all copies
> of the message and its attachments and notify us
> immediately.
> Thank you.
> ********************************************
Thread
RFE: Allow to use version-specific my.cnf filesHonza Horak25 Apr
  • Re: RFE: Allow to use version-specific my.cnf filesAndrĂ©s Tello25 Apr
    • Re: RFE: Allow to use version-specific my.cnf filesHonza Horak27 Apr
      • Re: RFE: Allow to use version-specific my.cnf filesShawn Green27 Apr
        • engine is now innoDB instead of MyISAM. Charles Brown28 Apr
          • Re: engine is now innoDB instead of MyISAM.Reindl Harald28 Apr
            • RE: engine is now innoDB instead of MyISAM.Charles Brown28 Apr
              • Re: engine is now innoDB instead of MyISAM.Claudio Nanni28 Apr
        • Re: RFE: Allow to use version-specific my.cnf filesHonza Horak2 May
    • RE: RFE: Allow to use version-specific my.cnf filesRick James2 May
      • Can the mysql replication limited to one database Charles Brown2 May
        • Re: Can the mysql replication limited to one databasea.smith2 May
          • RE: Can the mysql replication limited to one databaseRick James2 May
            • using the bin-log approach on the master side, how can I accomplishmy replication objectivesCharles Brown3 May
              • Re: using the bin-log approach on the master side, how can I accomplish my replication objectivesNitin Mehta3 May
        • RE: Can the mysql replication limited to one database Rick James2 May
          • Re: Can the mysql replication limited to one databaseClaudio Nanni2 May
            • Re: Can the mysql replication limited to one databaseSinger X.J. Wang2 May
            • RE: Can the mysql replication limited to one databaseRick James2 May
          • RE: Can the mysql replication limited to one database Charles Brown2 May
            • RE: Can the mysql replication limited to one database Rick James2 May
Re: engine is now innoDB instead of MyISAM.Claudio Nanni29 Apr
  • RE: engine is now innoDB instead of MyISAM.Charles Brown29 Apr
    • Re: engine is now innoDB instead of MyISAM.Reindl Harald29 Apr
      • Re: engine is now innoDB instead of MyISAM.Charles Brown29 Apr
        • Re: engine is now innoDB instead of MyISAM.Michael Dykman30 Apr
    • RE: engine is now innoDB instead of MyISAM.Claudio Nanni29 Apr
      • RE: engine is now innoDB instead of MyISAM.Rick James30 Apr
Re: using the bin-log approach on the master side, how can I accomplish my replication objectivesNitin Mehta3 May
  • RE: using the bin-log approach on the master side, how can Iaccomplish my replication objectivesCharles Brown3 May
    • Re: using the bin-log approach on the master side, how can I accomplish my replication objectivesNitin Mehta3 May
  • master BIN-LOG maintenaceCharles Brown3 May
    • Re: master BIN-LOG maintenaceNitin Mehta3 May
      • RE: master BIN-LOG maintenaceRick James3 May
  • RE: using the bin-log approach on the master side, how can Iaccomplish my replication objectivesRick James3 May