From: Rick James Date: May 2 2012 7:03pm Subject: RE: Can the mysql replication limited to one database List-Archive: http://lists.mysql.com/mysql/227300 Message-Id: <2E7DD7ADE53B044C8C8BCD9C5829E1EB1485A7E067@SP2-EX07VS01.ds.corp.yahoo.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="_000_2E7DD7ADE53B044C8C8BCD9C5829E1EB1485A7E067SP2EX07VS01ds_" --_000_2E7DD7ADE53B044C8C8BCD9C5829E1EB1485A7E067SP2EX07VS01ds_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Here's the use case that screws up a lot of people: USE db_that_is_not_replicated; INSERT INTO db_that_IS_replicate.tbl ...; Surprise! That INSERT is not replicated. Workaround: *wild will notice i= t. The other way around, the INSERT will be replicated, then hang replication = because the table won't be on the Slave. From: Claudio Nanni [mailto:claudio.nanni@stripped] Sent: Wednesday, May 02, 2012 10:25 AM To: Rick James Cc: Brown, Charles; mysql@stripped Subject: Re: Can the mysql replication limited to one database I recommend to use the 'wild' modifier, if you have a default db and you sp= ecify the schema in the query like update schemanotreplicated.mytable.....= you will miss that. Claudio 2012/5/2 Rick James > Yes, doable. In my.cnf on master: Binlog-do-database =3D dbname1 Binlog-do-database =3D dbname2 Would replicate those two dbs only. There are many other combinations using binlog/replicate-do/ignore-db/table= /wild. See the manual on replication, and especially the flowchart on how = those interact (sometimes in unexpected ways). > -----Original Message----- > From: Brown, Charles [mailto:CBrown@stripped] > Sent: Wednesday, May 02, 2012 8:44 AM > To: Rick James > Cc: mysql@stripped > Subject: Can the mysql replication limited to one database > > Hi Gurus, > > Can the mysql replication limited to selected schema or database? I've > been asked to set up mysql for only 1 out 5 databases exist in > production. Please advise if this is doable > > 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. > ******************************************** -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql -- Claudio --_000_2E7DD7ADE53B044C8C8BCD9C5829E1EB1485A7E067SP2EX07VS01ds_--