#### 13.4.3.3 Function which Configures Group Replication Primary

 The following function enables you to set a member of a single-primary replication group to take over as the primary. . The current primary becomes a read-only secondary, and the specified group member becomes the read-write primary. The function can be used on any member of a replication group running in single-primary mode. This function replaces the usual primary election process. [Section 18.5.1.1, “Changing a Group's Primary Member”](group-replication-changing-primary-member.html) explains the MySQL Server version requirements for the new primary member.

 If a standard source to replica replication channel is running on the existing primary member in addition to the Group Replication channels, you must stop that replication channel before you can change the primary member. You can identify the current primary using the `MEMBER_ROLE` column in the Performance Schema table [`replication_group_members`](performance-schema-replication-group-members-table.html), or the [`group_replication_primary_member`](server-status-variables.html#statvar_group_replication_primary_member) status variable.

 Any uncommitted transactions that the group is waiting on must be committed, rolled back, or terminated before the operation can complete. The function waits for all active transactions on the existing primary to end, including incoming transactions that are started after the function is used.

* []() [`group_replication_set_as_primary()`](group-replication-functions-for-new-primary.html#function_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`](replication-options.html#sysvar_server_uuid) of the member that you want to become the new primary.

   Syntax:

  ```
  STRING group_replication_set_as_primary(member_uuid)
  ```

   Arguments:

  * *`member_uuid`*: A string containing the UUID of the member of the group that you want to become the new primary.

   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”](group-replication-changing-primary-member.html)

