Documentation Home
MySQL 8.0 Reference Manual
Related Documentation Download this Manual
PDF (US Ltr) - 38.1Mb
PDF (A4) - 38.1Mb
PDF (RPM) - 33.0Mb
HTML Download (TGZ) - 8.1Mb
HTML Download (Zip) - 8.1Mb
HTML Download (RPM) - 7.0Mb
Man Pages (TGZ) - 132.7Kb
Man Pages (Zip) - 189.0Kb
Info (Gzip) - 3.4Mb
Info (Zip) - 3.4Mb
Excerpts from this Manual

MySQL 8.0 Reference Manual  /  ...  /  Functions which Configure the Group Replication Mode

13.4.3.3 Functions which Configure the Group Replication Mode

The following functions enable you to control the mode which a replication group is running in, either single-primary or multi-primary mode.

group_replication_switch_to_single_primary_mode() Syntax

Use group_replication_switch_to_single_primary_mode() to change a group running in multi-primary mode to single-primary mode. Must be issued on a member of a replication group running in multi-primary mode. For example:

SELECT group_replication_switch_to_single_primary_mode()

The election of the single-primary is controlled by the configured election weights . To override the election process and configure a specific member as the primary in the process, use SELECT group_replication_switch_to_single_primary_mode(member_uuid); where member_uuid is the server_uuid of the member which should become the primary.

group_replication_switch_to_multi_primary_mode(); Syntax

Use group_replication_switch_to_multi_primary_mode() to change a group running in single-primary mode to multi-primary mode. Must be issued on a member of a replication group running in single-primary mode. For example:

SELECT group_replication_switch_to_multi_primary_mode()

All members which belong to the group become primaries.

group_replication_set_as_primary(); Syntax

Use group_replication_set_as_primary(member_uuid) to appoint 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 which should become the new primary. Must be issued on a member of a replication group running in single-primary mode. For example:

SELECT group_replication_set_as_primary(member_uuid)

User Comments
User comments in this section are, as the name implies, provided by MySQL users. The MySQL documentation team is not responsible for, nor do they endorse, any of the information provided here.
Sign Up Login You must be logged in to post a comment.