binlog_do_db;
binlog_ignore_db;
This two parameter is used to control which database changes to log; The following is an example of binlog_ignore_db.
if Binlog_ignore_db=studio;
Use studio; INSERT into t (x, Y) VALUES (2,2);--This is not a binary log, because its execution context is studio.
Use Studio;insert into test.t (x, Y) VALUES (3,3);--Similarly, this does not log logging because its execution context is studio.
Attention:
Because the log is logged to the execution context, because insert into test.t (x, Y) VALUES (3,3), such statements its execution context and
Does not change, so in order to avoid the wrong filtering, do not write the database name. Table name Database name. The name of the name of the function database. SQL instead of the stored procedure name;
This behavior does not apply to row-based replication---because row-based replication works when each individual change occurs.
MySQL binary Log filtering