Oracle 5.0 Reference Manual page 1477

Table of Contents

Advertisement

Replication and Binary Logging Options and Variables
the SQL thread has no relay log to purge and is unable to satisfy the I/O thread. This forces the I/O
thread to ignore
--relay-log-space-limit
--replicate-do-db=db_name
Command-Line Format
Option-File Format
Tell the slave SQL thread to restrict replication to statements where the default database (that is,
the one selected by USE) is db_name. To specify more than one database, use this option multiple
times, once for each database. Note that this does not replicate cross-database statements such as
UPDATE some_db.some_table SET foo='bar'
no database.
Warning
To specify multiple databases you must use multiple instances of this option.
Because database names can contain commas, if you supply a comma
separated list then the list will be treated as the name of a single database.
An example of what does not work as you might expect: If the slave is started with
[1457]
do-db=sales
is not replicated:
USE prices;
UPDATE sales.january SET amount=amount+1000;
The main reason for this "check just the default database" behavior is that it is difficult from the
statement alone to know whether it should be replicated (for example, if you are using multiple-table
or multiple-table
DELETE
check only the default database rather than all databases if there is no need.
If you need cross-database updates to work, use
[1459]
instead. See
%
Beginning with MySQL 5.0.84, this option has no effect on BEGIN, COMMIT, or
statements. (Bug #43263)
--replicate-ignore-db=db_name
Command-Line Format
Option-File Format
Tells the slave SQL thread not to replicate any statement where the default database (that is, the one
selected by USE) is db_name. To specify more than one database to ignore, use this option multiple
times, once for each database. You should not use this option if you are using cross-database
updates and you do not want these updates to be replicated. See
Evaluate Replication Filtering
An example of what does not work as you might expect: If the slave is started with
ignore-db=sales
statement is replicated:
USE prices;
[1457]
--replicate-do-db=name
replicate-do-db
Permitted Values
Type
string
and you issue the following statements on the master, the
statements that go across multiple databases). It is also faster to
UPDATE
Section 16.2.3, "How Servers Evaluate Replication Filtering
[1457]
--replicate-ignore-db=name
replicate-ignore-db
Permitted Values
Type
string
Rules".
[1457]
and you issue the following statements on the master, the
1457
[1456]
temporarily.
while having selected a different database or
--replicate-wild-do-table=db_name.
Section 16.2.3, "How Servers
--replicate-
statement
UPDATE
Rules".
ROLLBACK
--replicate-
UPDATE

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents