13.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 the GROUP_REPLICATION_ADMIN privilege (or the deprecated SUPER privilege). 此语句需要GROUP_REPLICATION_ADMIN权限(或不推荐使用的SUPER权限)。If super_read_only=ON is set and the member should join as a primary, super_read_only is set to OFF once Group Replication successfully starts.如果设置了super_read_only=ON,并且成员应作为主成员加入,则一旦组复制成功启动,super_read_only将设置为OFF

From MySQL 8.0.21, you can specify user credentials for distributed recovery on the START GROUP_REPLICATION statement using the USER, PASSWORD, and DEFAULT_AUTH options, as follows:在MySQL 8.0.21中,您可以使用USERPASSWORDDEFAULT_AUTH选项在START GROUP_REPLICATION语句中指定分布式恢复的用户凭据,如下所示:

These credentials are used for distributed recovery on the group_replication_recovery channel. 这些凭据用于group_replication_recovery通道上的分布式恢复。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. START GROUP_REPLICATION上指定用户凭据时,这些凭据仅保存在内存中,并通过STOP GROUP_REPLICATION语句或服务器关闭来删除。You must issue a START GROUP_REPLICATION statement to provide the credentials again. 必须发出START GROUP_REPLICATION语句才能再次提供凭据。This method is therefore not compatible with starting Group Replication automatically on server start, as specified by the group_replication_start_on_boot system variable.因此,此方法与在服务器启动时自动启动组复制不兼容,这是由group_replication_start_on_boot系统变量指定的。

User credentials specified on START GROUP_REPLICATION take precedence over any user credentials set for the group_replication_recovery channel using a CHANGE REPLICATION SOURCE TO statement (from MySQL 8.0.23) or CHANGE MASTER TO statement (before MySQL 8.0.23). 使用CHANGE REPLICATION SOURCE TO语句(从MySQL 8.0.23开始)或CHANGE MASTER TO语句(在MySQL 8.0.23之前),在START GROUP_REPLICATION上指定的用户凭据优先于为group_replication_recovery通道设置的任何用户凭据。Note that user credentials set using these statements are stored in the replication metadata repositories, and are used when START GROUP_REPLICATION is specified without user credentials, including automatic starts if the group_replication_start_on_boot system variable is set to ON. 请注意,使用这些语句设置的用户凭据存储在复制元数据存储库中,并在没有用户凭据的情况下指定START GROUP_REPLICATION时使用,包括在group_replication_start_on_boot系统变量设置为ON时自动启动。To gain the security benefits of specifying user credentials on START GROUP_REPLICATION, ensure that group_replication_start_on_boot is set to OFF (the default is ON), and clear any user credentials previously set for the group_replication_recovery channel, following the instructions in Section 18.6.3, “Securing Distributed Recovery Connections”.要获得在START GROUP_REPLICATION时指定用户凭据的安全好处,请确保将group_replication_start_on_boot设置为OFF(默认设置为ON),并按照第18.6.3节,“保护分布式恢复连接”中的说明,清除之前为group_replication_recovery通道设置的所有用户凭据。