MySQL Binary Log Filter does not work
Wed, 2015-10-21 05:23 —
oli
Problem
We use the following binary log filter for filtering out some schemata.
binlog-ignore-db = mysql, information_schema, test
What is wrong with this filter it somehow does not work: :-(
Solution
there are different things to mention:
- The dash (
-) notation is for command line options (--binlog-ignore-db) the underscore (_) is for the MySQL configuration file (binlog_ignore_db = ...). The configuration accepts both but is is not good style. - Then because MySQL database names can contain special characters and commas (
,) your filter is interpreted as database name "mysql, information_schema, test". This is possibly not what you intended. You have to put every database filter into its own separate line like this:binlog_ignore_db = mysqlbinlog_ignore_db = information_schemabinlog_ignore_db = test
To specify multiple databases you must use multiple instances of this option. Because database names can contain commas, the list will be treated as the name of a single database if you supply a comma-separated list.
- Further
information_schemais not replicated anyway so this information is obsolete. - Then we at FromDual consider it as a bad idea to filter on the master because then the information are NOT contained in the Binary Logs which are needed for a proper point-in-time-recovery (PiTR).

