#### 17.5.1.13 Replication and FLUSH

[]()[]()

 Some forms of the [`FLUSH`](flush.html) statement are not logged because they could cause problems if replicated to a replica: [`FLUSH LOGS`](flush.html#flush-logs) and [`FLUSH TABLES WITH READ LOCK`](flush.html#flush-tables-with-read-lock). For a syntax example, see [Section 13.7.8.3, “FLUSH Statement”](flush.html). The [`FLUSH TABLES`](flush.html#flush-tables), [`ANALYZE TABLE`](analyze-table.html), [`OPTIMIZE TABLE`](optimize-table.html), and [`REPAIR TABLE`](repair-table.html) statements are written to the binary log and thus replicated to replicas. 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 [`GRANT`](grant.html), you must issue a [`FLUSH PRIVILEGES`](flush.html#flush-privileges) on the replicas to put the new privileges into effect. In addition, if you use [`FLUSH TABLES`](flush.html#flush-tables) when renaming a `MyISAM` table that is part of a `MERGE` table, you must issue [`FLUSH TABLES`](flush.html#flush-tables) manually on the replicas. These statements are written to the binary log unless you specify `NO_WRITE_TO_BINLOG` or its alias `LOCAL`.

