Replication and Binary Logging Options and Variables
1470
Another case which may not be self-evident occurs when a given database is replicated even though
it was not specified when setting the option. If the server is started with
--binlog-do-db=sales
,
the following
UPDATE
statement is logged even though
prices
was not included when setting
--
binlog-do-db
:
USE sales;
UPDATE prices.discounts SET percentage = perc 10;
Because
sales
is the default database when the
UPDATE
statement is issued, the
UPDATE
is
logged.
Important
To log multiple databases, use this option multiple times, specifying the
option once for each database to be logged. 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.
•
--binlog-ignore-db=db_name
[1470]
Command-Line Format
--binlog-ignore-db=name
Option-File Format
binlog-ignore-db
Permitted Values
Type
string
This option affects binary logging in a manner similar to the way that
--replicate-ignore-
db
[1457]
affects replication.
Tell the server to suppress binary logging of updates for which the default database is
db_name
(that
is, the database selected by
USE
). If you use this option, you should ensure that you do updates only
in the default database.
As with the
--binlog-do-db
[1469]
option, there is an exception for the
CREATE DATABASE
,
ALTER DATABASE
, and
DROP DATABASE
statements. The server uses the database named in the
statement (not the default database) to decide whether it should log the statement.
An example of what does not work as you might expect: If the server is started with
binlog-
ignore-db=sales
, and you run
USE prices; UPDATE sales.january SET amount =
1000;
, this statement is written into the binary log.
Important
To ignore multiple databases, use this option multiple times, specifying the
option once for each database to be ignored. 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.
Testing and debugging options.
The following binary log options are used in replication testing
and debugging. They are not intended for use in normal operations.
•
--max-binlog-dump-events=N
[1470]
Command-Line Format
--max-binlog-dump-events=#
Option-File Format
max-binlog-dump-events
Permitted Values
Type
numeric
Summary of Contents for 5.0
Page 1: ...MySQL 5 0 Reference Manual ...
Page 18: ...xviii ...
Page 60: ...40 ...
Page 396: ...376 ...
Page 578: ...558 ...
Page 636: ...616 ...
Page 844: ...824 ...
Page 1234: ...1214 ...
Page 1427: ...MySQL Proxy Scripting 1407 ...
Page 1734: ...1714 ...
Page 1752: ...1732 ...
Page 1783: ...Configuring Connector ODBC 1763 ...
Page 1793: ...Connector ODBC Examples 1773 ...
Page 1839: ...Connector Net Installation 1819 2 You must choose the type of installation to perform ...
Page 2850: ...2830 ...
Page 2854: ...2834 ...
Page 2928: ...2908 ...
Page 3000: ...2980 ...
Page 3122: ...3102 ...
Page 3126: ...3106 ...
Page 3174: ...3154 ...
Page 3232: ...3212 ...