Re: replicating only certain tables?
Chris Petersen [EMAIL PROTECTED] wrote: I'm trying to set up two-way replication between our colo and our office (slow DSL line), so our web customers can get the fast speeds of our colo, and the people in the office can also get the fast speeds of our internal network. Since our colo machine is logging customer shopping cart info (etc.) that we don't need to send down the pipe to the office (and vice versa, a lot of stuff happening in-office that doesn't need to go out to the main web db box), is there any way to tell the MASTER not to send info? I can only see slave controls in the documentation (things like replicate-ignore-table or replicate-do-table), but those don't seem to prevent the data from being sent to the slave, only whether or not the slave decides to use it. You can restrict logging only on the database level with binlog-do-db/binlog-ignore-db options: http://www.mysql.com/doc/en/Binary_log.html Take a look also at SET SQL_LOG_BIN command: http://www.mysql.com/doc/en/SET_SQL_LOG_BIN.html -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Victoria Reznichenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net ___/ www.mysql.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: replicating only certain tables?
You can restrict logging only on the database level with binlog-do-db/binlog-ignore-db options: http://www.mysql.com/doc/en/Binary_log.html I don't want to restrict logging, only replication. I think I figured it out, though, despite the fact that the documentation is completely inadequate on the subject (couldn't find any info at all about this). The documentation reads: Each slave server receives from the master the saved updates that the master has recorded in its binary log, so that the slave can execute the same updates on its copy of the data. I read this as the master sending all of its log data to the slave, and the slave then parsing that data according to its ignore-db and/or ignore-table settings. However, another admin informed me that the slave actually connects to the master and uses some kind of pseudo-query to grab only the log data that it wants. Thus, data from any table listed with replicate-ignore-table is never actually downloaded to the slave at all. Since the documentation is aimed more at replication-for-efficiency rather than replication-for-redundancy, it talks about updating and replicating but doesn't refer directly to how the data transfer itself works. It's rather annoying. -Chris -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: replicating only certain tables?
Chris, Agreed that the replication section could be written more clearly, but is not the information you are looking for in section 6.3 Replication Implementation Details, section 6.6 features problems, 6.7 startup options and 6.8 FAQ? PB - Original Message - From: Chris Petersen To: [EMAIL PROTECTED] Sent: Tuesday, March 30, 2004 1:20 PM Subject: Re: replicating only certain tables? You can restrict logging only on the database level with binlog-do-db/binlog-ignore-db options: http://www.mysql.com/doc/en/Binary_log.html I don't want to restrict logging, only replication. I think I figured it out, though, despite the fact that the documentation is completely inadequate on the subject (couldn't find any info at all about this). The documentation reads: Each slave server receives from the master the saved updates that the master has recorded in its binary log, so that the slave can execute the same updates on its copy of the data. I read this as the master sending all of its log data to the slave, and the slave then parsing that data according to its ignore-db and/or ignore-table settings. However, another admin informed me that the slave actually connects to the master and uses some kind of pseudo-query to grab only the log data that it wants. Thus, data from any table listed with replicate-ignore-table is never actually downloaded to the slave at all. Since the documentation is aimed more at replication-for-efficiency rather than replication-for-redundancy, it talks about updating and replicating but doesn't refer directly to how the data transfer itself works. It's rather annoying. -Chris -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]
Re: replicating only certain tables?
Agreed that the replication section could be written more clearly, but is not the information you are looking for in section 6.3 Replication Implementation Details, section 6.6 features problems, 6.7 startup options and 6.8 FAQ? You must be reading a different manual than me (http://www.mysql.com/doc/en/Replication.html), some of your section numbers are all different than what I see. Anyway... 6.3 (Replication Implementation Details) seems to disagree with my previous findings, describing the download slave thread as simply downloading everything the master sends to it. However, it says nothing about whether or not the request thread tells the master to or not to send certain tables/databases. I can't find anything related anywhere sle in the replication documentation section about this, either. -Chris -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
replicating only certain tables?
I'm trying to set up two-way replication between our colo and our office (slow DSL line), so our web customers can get the fast speeds of our colo, and the people in the office can also get the fast speeds of our internal network. Since our colo machine is logging customer shopping cart info (etc.) that we don't need to send down the pipe to the office (and vice versa, a lot of stuff happening in-office that doesn't need to go out to the main web db box), is there any way to tell the MASTER not to send info? I can only see slave controls in the documentation (things like replicate-ignore-table or replicate-do-table), but those don't seem to prevent the data from being sent to the slave, only whether or not the slave decides to use it. Thanks, -Chris -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]