<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h3 class="title">
      <a name="group-replication-deploying-in-multi-primary-or-single-primary-mode">
      </a>
      20.1.3 Multi-Primary and Single-Primary Modes
     </h3>
    </div>
   </div>
  </div>
  <div class="toc">
   <dl class="toc">
    <dt>
     <span class="section">
      <a href="group-replication-single-primary-mode.html">
       20.1.3.1 Single-Primary Mode
      </a>
     </span>
    </dt>
    <dt>
     <span class="section">
      <a href="group-replication-multi-primary-mode.html">
       20.1.3.2 Multi-Primary Mode
      </a>
     </span>
    </dt>
   </dl>
  </div>
  <a class="indexterm" name="idm46045134507856">
  </a>
  <a class="indexterm" name="idm46045134506352">
  </a>
  <a class="indexterm" name="idm46045134504864">
  </a>
  <p>
   Group Replication operates either in single-primary mode or in
      multi-primary mode. The group's mode is a group-wide configuration
      setting, specified by the
   <a class="link" href="group-replication-system-variables.html#sysvar_group_replication_single_primary_mode">
    <code class="literal">
     group_replication_single_primary_mode
    </code>
   </a>
   system variable, which must be the same on all members.
   <code class="literal">
    ON
   </code>
   means single-primary mode, which is the
      default mode, and
   <code class="literal">
    OFF
   </code>
   means multi-primary mode.
      It is not possible to have members of the group deployed in
      different modes, for example one member configured in
      multi-primary mode while another member is in single-primary mode.
  </p>
  <p>
   You cannot change the value of
   <a class="link" href="group-replication-system-variables.html#sysvar_group_replication_single_primary_mode">
    <code class="literal">
     group_replication_single_primary_mode
    </code>
   </a>
   manually while Group Replication is running. You can use the
   <a class="link" href="group-replication-functions-for-mode.html#function_group-replication-switch-to-single-primary-mode">
    <code class="literal">
     group_replication_switch_to_single_primary_mode()
    </code>
   </a>
   and
   <a class="link" href="group-replication-functions-for-mode.html#function_group-replication-switch-to-multi-primary-mode">
    <code class="literal">
     group_replication_switch_to_multi_primary_mode()
    </code>
   </a>
   functions to move a group from one mode to another while Group
      Replication is still running. These functions manage the process
      of changing the group's mode and ensure the safety and consistency
      of your data. In earlier releases, to change the group's mode you
      must stop Group Replication and change the value of
   <a class="link" href="group-replication-system-variables.html#sysvar_group_replication_single_primary_mode">
    <code class="literal">
     group_replication_single_primary_mode
    </code>
   </a>
   on all members. Then carry out a full reboot of the group (a
      bootstrap by a server with
   <a class="link" href="group-replication-system-variables.html#sysvar_group_replication_bootstrap_group">
    <code class="literal">
     group_replication_bootstrap_group=ON
    </code>
   </a>
   )
      to implement the change to the new operating configuration. You do
      not need to restart the servers.
  </p>
  <p>
   Regardless of the deployed mode, Group Replication does not handle
      client-side failover. That must be handled by a middleware
      framework such as
   <a class="ulink" href="/doc/mysql-router/8.4/en/" target="_top">
    MySQL Router 8.4
   </a>
   , a proxy, a
      connector, or the application itself.
  </p>
 </div>
 <br/>
</div>
