<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h4 class="title">
      <a name="replication-features-flush">
      </a>
      19.5.1.13 Replication and FLUSH
     </h4>
    </div>
   </div>
  </div>
  <a class="indexterm" name="idm46045135622384">
  </a>
  <a class="indexterm" name="idm46045135620896">
  </a>
  <p>
   Some forms of the
   <a class="link" href="flush.html" title="15.7.8.3 FLUSH Statement">
    <code class="literal">
     FLUSH
    </code>
   </a>
   statement
        are not logged because they could cause problems if replicated
        to a replica:
   <a class="link" href="flush.html#flush-logs">
    <code class="literal">
     FLUSH LOGS
    </code>
   </a>
   and
   <a class="link" href="flush.html#flush-tables-with-read-lock">
    <code class="literal">
     FLUSH TABLES WITH READ LOCK
    </code>
   </a>
   . For
        a syntax example, see
   <a class="xref" href="flush.html" title="15.7.8.3 FLUSH Statement">
    Section 15.7.8.3, “FLUSH Statement”
   </a>
   . The
   <a class="link" href="flush.html#flush-tables">
    <code class="literal">
     FLUSH TABLES
    </code>
   </a>
   ,
   <a class="link" href="analyze-table.html" title="15.7.3.1 ANALYZE TABLE Statement">
    <code class="literal">
     ANALYZE TABLE
    </code>
   </a>
   ,
   <a class="link" href="optimize-table.html" title="15.7.3.4 OPTIMIZE TABLE Statement">
    <code class="literal">
     OPTIMIZE TABLE
    </code>
   </a>
   , and
   <a class="link" href="repair-table.html" title="15.7.3.5 REPAIR TABLE Statement">
    <code class="literal">
     REPAIR TABLE
    </code>
   </a>
   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.
  </p>
  <p>
   However, this behavior can cause difficulties under certain
        circumstances. If you replicate the privilege tables in the
   <code class="literal">
    mysql
   </code>
   database and update those tables
        directly without using
   <a class="link" href="grant.html" title="15.7.1.6 GRANT Statement">
    <code class="literal">
     GRANT
    </code>
   </a>
   , you
        must issue a
   <a class="link" href="flush.html#flush-privileges">
    <code class="literal">
     FLUSH PRIVILEGES
    </code>
   </a>
   on
        the replicas to put the new privileges into effect. In addition,
        if you use
   <a class="link" href="flush.html#flush-tables">
    <code class="literal">
     FLUSH TABLES
    </code>
   </a>
   when
        renaming a
   <code class="literal">
    MyISAM
   </code>
   table that is part of a
   <code class="literal">
    MERGE
   </code>
   table, you must issue
   <a class="link" href="flush.html#flush-tables">
    <code class="literal">
     FLUSH TABLES
    </code>
   </a>
   manually on the
        replicas. These statements are written to the binary log unless
        you specify
   <code class="literal">
    NO_WRITE_TO_BINLOG
   </code>
   or its alias
   <code class="literal">
    LOCAL
   </code>
   .
  </p>
 </div>
 <br/>
</div>
