Replication and Binary Logging Options and Variables UPDATE sales.february SET amount=amount+100; USE prices; UPDATE prices.march SET amount=amount-25; USE db1; UPDATE db1.table1, db2.table2 SET db1.table1.col1 = 10, db2.table2.col2 = 20; USE db4; UPDATE db1.table1, db2.table2 SET db1.table1.col1 = 10, db2.table2.col2 = 20; The effects of this option depend on whether the statement-based or row-based logging format is in use, in the same way that the effects of  --replicate-ignore-db  depend on whether statement-based or row-based replication is in use. You should keep in mind that the format used to log a given statement may not necessarily be the same as that indicated by the value of  binlog_format . For example, DDL statements such as  CREATE TABLE  and  ALTER TABLE  are always logged as statements, without 3544 This option affects binary logging in a manner similar to the way that  --replicate-ignore-db  affects replication. In this case, the  UPDATE  statement is not written to the binary log when using statement-based logging. However, when using row-based logging, the change to  table1  is logged, but not that to  table2 —in other words, only changes to tables in the database named by  --binlog-do-db  are logged, and the choice of default database has no effect on this behavior. • --binlog-ignore-db= db_name Command-Line Format --binlog-ignore-db=name Type String If you are using statement-based logging, the updates to both tables are written to the binary log. However, when using the row-based format, only the changes to  table1  are logged;  table2  is in a different database, so it is not changed by the  UPDATE . Now suppose that, instead of the  USE db1 statement, a  USE db4  statement had been used: Another important difference in  --binlog-do-db  handling for statement-based logging as opposed to the row-based logging occurs with regard to statements that refer to multiple databases. Suppose that the server is started with  --binlog-do-db=db1 , and the following statements are executed: Even if the  USE prices  statement were changed to  USE sales , the  UPDATE  statement’s effects would still not be written to the binary log. The changes to the  february  table in the  sales  database are logged in accordance with the  UPDATE statement; this occurs whether or not the  USE  statement was issued. However, when using the row- based logging format and  --binlog-do-db=sales , changes made by the following  UPDATE  are not logged: