SQL Statements for Controlling Replica Servers statement applies to the default channel. If a  STOP REPLICA | SLAVE  statement does not name a channel when using multiple channels, this statement stops the specified threads for all channels. This statement cannot be used with the  group_replication_recovery  channel. See Section 17.2.2, “Replication Channels”  for more information. When the replica is multithreaded ( slave_parallel_workers  is a nonzero value), any gaps in the sequence of transactions executed from the relay log are closed as part of stopping the worker threads. If the replica is stopped unexpectedly (for example due to an error in a worker thread, or another thread issuing  KILL ) while a  STOP REPLICA | SLAVE  statement is executing, the sequence of executed transactions from the relay log may become inconsistent. See Section 17.5.1.34, “Replication and Transaction Inconsistencies” , for more information. When the source is using the row-based binary logging format, you should execute  STOP REPLICA | SLAVE  or  STOP REPLICA | SLAVE SQL_THREAD  on the replica prior to shutting down the replica server if you are replicating any tables that use a nontransactional storage engine. If the current replication event group has modified one or more nontransactional tables,  STOP REPLICA | SLAVE  waits for up to 60 seconds for the event group to complete, unless you issue a  KILL QUERY  or  KILL CONNECTION statement for the replication SQL thread. If the event group remains incomplete after the timeout, an error message is logged. When the source is using the statement-based binary logging format, changing the source while it has open temporary tables is potentially unsafe. This is one of the reasons why statement-based replication of temporary tables is not recommended. You can find out whether there are any temporary tables on the replica by checking the value of  Slave_open_temp_tables ; when using statement-based replication, this value should be 0 before executing  CHANGE REPLICATION SOURCE TO  |  CHANGE MASTER TO . If there are any temporary tables open on the replica, issuing a  CHANGE REPLICATION SOURCE TO  |  CHANGE MASTER TO  statement after issuing a  STOP REPLICA | SLAVE  causes an ER_WARN_OPEN_TEMP_TABLES_MUST_BE_ZERO  warning. Stops the replication threads. From MySQL 8.0.22,  STOP SLAVE  is deprecated and the alias  STOP REPLICA  should be used instead. The statement works in the same way as before, only the terminology used for the statement and its output has changed. Both versions of the statement update the same status variables when used. Please see the documentation for  STOP REPLICA  for a description of the statement. The following functions, which are available from MySQL 8.0.22 for standard source to replica replication and from MySQL 8.0.23 for Group Replication, enable you to add and remove replication source servers from the source list for a replication channel. The asynchronous connection failover mechanism automatically establishes an asynchronous (source to replica) replication connection to a new source from the appropriate list after the existing connection from the replica to its source fails. From MySQL 8.0.23, the connection is also changed if the currently connected source does not have the highest weighted priority in the group. For Group Replication source servers that are defined as part of a managed group, the connection is also failed over to another group member if the currently connected source leaves the group 2781 13.4.2.11 Functions which Configure the Source List 13.4.2.10 STOP SLAVE | REPLICA Statement STOP {SLAVE | REPLICA} [ thread_types ] [ channel_option ] thread_types : [ thread_type  [,  thread_type ] ... ] thread_type : IO_THREAD | SQL_THREAD channel_option : FOR CHANNEL  channel