MySQL :: MySQL 8.0 Reference Manual :: 15.4.3.1 START GROUP_REPLICATION Statement (original) (raw)

15.4.3.1 START GROUP_REPLICATION Statement

  START GROUP_REPLICATION
          [USER='user_name']
          [, PASSWORD='user_pass']
          [, DEFAULT_AUTH='plugin_name']

Starts group replication. This statement requires theGROUP_REPLICATION_ADMIN privilege (or the deprecated SUPER privilege). Ifsuper_read_only=ON is set and the member should join as a primary,super_read_only is set toOFF once Group Replication successfully starts.

A server that participates in a group in single-primary mode should useskip_replica_start=ON. Otherwise, the server is not allowed to join a group as a secondary.

In MySQL 8.0.21 and later, you can specify user credentials for distributed recovery on the START GROUP_REPLICATION statement using theUSER, PASSWORD, andDEFAULT_AUTH options, as follows:

These credentials are used for distributed recovery on thegroup_replication_recovery channel. When you specify user credentials on START GROUP_REPLICATION, the credentials are saved in memory only, and are removed by a STOP GROUP_REPLICATION statement or server shutdown. You must issue a START GROUP_REPLICATION statement to provide the credentials again. This method is therefore not compatible with starting Group Replication automatically on server start, as specified by thegroup_replication_start_on_boot system variable.

User credentials specified on START GROUP_REPLICATION take precedence over any user credentials set for thegroup_replication_recovery channel using aCHANGE REPLICATION SOURCE TO statement (from MySQL 8.0.23) or CHANGE MASTER TO statement (before MySQL 8.0.23). Note that user credentials set using these statements are stored in the replication metadata repositories, and are used whenSTART GROUP_REPLICATION is specified without user credentials, including automatic starts if thegroup_replication_start_on_boot system variable is set to ON. To gain the security benefits of specifying user credentials onSTART GROUP_REPLICATION, ensure thatgroup_replication_start_on_boot is set to OFF (the default isON), and clear any user credentials previously set for thegroup_replication_recovery channel, following the instructions inSection 20.6.3, “Securing Distributed Recovery Connections”.

While a member is rejoining a replication group, its status can be displayed as OFFLINE orERROR before the group completes the compatibility checks and accepts it as a member. When the member is catching up with the group's transactions, its status isRECOVERING.