Before MySQL 4.1.1, the FLUSH,
ANALYZE TABLE,
OPTIMIZE TABLE, and
REPAIR TABLE statements are not
written to the binary log and thus are not replicated to the
slaves. This is not normally a problem because these statements
do not modify table data.
However, this behavior can cause difficulties under certain
circumstances. If you replicate the privilege tables in the
mysql database and update those tables
directly without using the GRANT
statement, you must issue a
FLUSH
PRIVILEGES statement on your slaves to put the new
privileges into effect. Also if you use
FLUSH TABLES
when renaming a MyISAM table that is part of
a MERGE table, you must issue
FLUSH TABLES
manually on the slaves.
As of MySQL 4.1.1, these statements are written to the binary
log (unless you specify NO_WRITE_TO_BINLOG or
its alias LOCAL). Exceptions are that
FLUSH LOGS,
FLUSH MASTER,
FLUSH SLAVE,
and FLUSH TABLES WITH
READ LOCK are not logged in any case because they may
cause problems if replicated to a slave. For a syntax example,
see Section 12.4.6.2, “FLUSH Syntax”.

User Comments
Add your own comment.