<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h4 class="title">
      <a name="stop-group-replication">
      </a>
      15.4.3.2 STOP GROUP_REPLICATION Statement
     </h4>
    </div>
   </div>
  </div>
  <a class="indexterm" name="idm46045176807312">
  </a>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa83991236"><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 keyword">STOP</span> <span class="token keyword">GROUP_REPLICATION</span></code></pre>
  </div>
  <p>
   Stops Group Replication. This statement requires the
   <a class="link" href="privileges-provided.html#priv_group-replication-admin">
    <code class="literal">
     GROUP_REPLICATION_ADMIN
    </code>
   </a>
   privilege
        (or the deprecated
   <a class="link" href="privileges-provided.html#priv_super">
    <code class="literal">
     SUPER
    </code>
   </a>
   privilege). As soon as you issue
   <a class="link" href="stop-group-replication.html" title="15.4.3.2 STOP GROUP_REPLICATION Statement">
    <code class="literal">
     STOP
        GROUP_REPLICATION
    </code>
   </a>
   the member is set to
   <a class="link" href="server-system-variables.html#sysvar_super_read_only">
    <code class="literal">
     super_read_only=ON
    </code>
   </a>
   , which
        ensures that no writes can be made to the member while Group
        Replication stops. Any other asynchronous replication channels
        running on the member are also stopped. Any user credentials
        that you specified in the
   <a class="link" href="start-group-replication.html" title="15.4.3.1 START GROUP_REPLICATION Statement">
    <code class="literal">
     START
        GROUP_REPLICATION
    </code>
   </a>
   statement when starting Group
        Replication on this member are removed from memory, and must be
        supplied when you start Group Replication again.
  </p>
  <div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
   <div class="admon-title">
    Warning
   </div>
   <p>
    Use this statement with extreme caution because it removes the
          server instance from the group, meaning it is no longer
          protected by Group Replication's consistency guarantee
          mechanisms. To be completely safe, ensure that your
          applications can no longer connect to the instance before
          issuing this statement to avoid any chance of stale reads.
   </p>
  </div>
  <p>
   The
   <a class="link" href="stop-group-replication.html" title="15.4.3.2 STOP GROUP_REPLICATION Statement">
    <code class="literal">
     STOP GROUP_REPLICATION
    </code>
   </a>
   statement stops asynchronous replication channels on the group
        member, but it does not implicitly commit transactions that are
        in progress on them like
   <a class="link" href="stop-replica.html" title="15.4.2.5 STOP REPLICA Statement">
    <code class="literal">
     STOP
        REPLICA
    </code>
   </a>
   does. This is because on a Group Replication
        group member, an additional transaction committed during the
        shutdown operation would leave the member inconsistent with the
        group and cause an issue with rejoining. To avoid failed commits
        for transactions that are in progress while stopping Group
        Replication, the
   <a class="link" href="stop-group-replication.html" title="15.4.3.2 STOP GROUP_REPLICATION Statement">
    <code class="literal">
     STOP
        GROUP_REPLICATION
    </code>
   </a>
   statement cannot be issued while a
        GTID is assigned as the value of the
   <code class="literal">
    gtid_next
   </code>
   system variable.
  </p>
  <p>
   The
   <a class="link" href="group-replication-system-variables.html#sysvar_group_replication_components_stop_timeout">
    <code class="literal">
     group_replication_components_stop_timeout
    </code>
   </a>
   system variable specifies the time for which Group Replication
        waits for each of its modules to complete ongoing processes
        after this statement is issued. The timeout is used to resolve
        situations in which Group Replication components cannot be
        stopped normally, which can happen if the member is expelled
        from the group while it is in an error state, or while a process
        such as MySQL Enterprise Backup is holding a global lock on tables on the member.
        In such situations, the member cannot stop the applier thread or
        complete the distributed recovery process to rejoin.
   <code class="literal">
    STOP GROUP_REPLICATION
   </code>
   does not complete
        until either the situation is resolved (for example, by the lock
        being released), or the component timeout expires and the
        modules are shut down regardless of their status. The default
        value is 300 seconds; this means that Group Replication
        components are stopped after 5 minutes if the situation is not
        resolved before that time, allowing the member to be restarted
        and rejoin.
  </p>
 </div>
 <br/>
</div>
