<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h4 class="title">
      <a name="replication-multi-source-reset-replica">
      </a>
      19.1.5.7 Resetting Multi-Source Replicas
     </h4>
    </div>
   </div>
  </div>
  <a class="indexterm" name="idm46045145143760">
  </a>
  <p>
   The
   <a class="link" href="reset-replica.html" title="15.4.2.3 RESET REPLICA Statement">
    <code class="literal">
     RESET REPLICA
    </code>
   </a>
   statement can be
      used to reset a multi-source replica. By default, if you use the
   <a class="link" href="reset-replica.html" title="15.4.2.3 RESET REPLICA Statement">
    <code class="literal">
     RESET REPLICA
    </code>
   </a>
   statement on a
      multi-source replica all channels are reset. Optionally, use the
   <code class="literal">
    FOR CHANNEL
    <em class="replaceable">
     <code>
      channel
     </code>
    </em>
   </code>
   clause to reset only a specific channel.
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      To reset all currently configured replication channels:
     </p>
     <div class="copytoclipboard-wrapper">
      <pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa34271379"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql&gt;</span> <span class="token keyword">RESET</span> <span class="token keyword">REPLICA</span><span class="token punctuation">;</span></code></pre>
     </div>
    </li>
    <li class="listitem">
     <p>
      To reset only a named channel, use a
      <code class="literal">
       FOR CHANNEL
       <em class="replaceable">
        <code>
         channel
        </code>
       </em>
      </code>
      clause:
     </p>
     <div class="copytoclipboard-wrapper">
      <pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa59615972"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql&gt;</span> <span class="token keyword">RESET</span> <span class="token keyword">REPLICA</span> <span class="token keyword">FOR</span> <span class="token keyword">CHANNEL</span> <span class="token string">"source_1"</span><span class="token punctuation">;</span></code></pre>
     </div>
    </li>
   </ul>
  </div>
  <p>
   For GTID-based replication, note that
   <a class="link" href="reset-replica.html" title="15.4.2.3 RESET REPLICA Statement">
    <code class="literal">
     RESET
      REPLICA
    </code>
   </a>
   has no effect on the replica's GTID
      execution history. If you want to clear this, issue
   <a class="link" href="reset-binary-logs-and-gtids.html" title="15.4.1.2 RESET BINARY LOGS AND GTIDS Statement">
    <code class="literal">
     RESET BINARY LOGS AND GTIDS
    </code>
   </a>
   on the
      replica.
  </p>
  <p>
   <a class="link" href="reset-replica.html" title="15.4.2.3 RESET REPLICA Statement">
    <code class="literal">
     RESET REPLICA
    </code>
   </a>
   makes the replica
      forget its replication position, and clears the relay log, but it
      does not change any replication connection parameters (such as the
      source host name) or replication filters. If you want to remove
      these for a channel, issue
   <a class="link" href="reset-replica.html" title="15.4.2.3 RESET REPLICA Statement">
    <code class="literal">
     RESET REPLICA
      ALL
    </code>
   </a>
   .
  </p>
 </div>
 <br/>
</div>
