The following function enables you to configure which member of a single-primary replication group is the primary.以下功能使您能够配置单个主复制组的哪个成员是主复制组。
group_replication_set_as_primary()
Appoints a specific member of the group as the new primary, overriding any election process. 任命小组中的特定成员作为新的初选成员,凌驾于任何选举过程之上。Pass in 传入member_uuid
which is the server_uuid
of the member that you want to become the new primary. member_uuid
,它是要成为新主成员的成员的server_uuid
。Must be issued on a member of a replication group running in single-primary mode.必须对以单一主模式运行的复制组的成员发出。
Syntax:语法:
STRING group_replication_set_as_primary(member_uuid
)
Return value:返回值:
A string containing the result of the operation, for example whether it was successful or not.包含操作结果的字符串,例如操作是否成功。
Example:例子:
SELECT group_replication_set_as_primary(member_uuid
)
For more information, see Section 18.5.1.1, “Changing a Group's Primary Member”有关更多信息,请参阅第18.5.1.1节,“更改组的主要成员”