STOP SLAVE IO_THREAD; START SLAVE IO_THREAD; Or from MySQL 8.0.22: STOP REPLICA IO_THREAD; START REPLICA IO_THREAD; 

If the replication I/O thread is already running and you do not restart it, the replica continues to use asynchronous replication. 

At server startup, the variables that control semisynchronous replication can be set as command-line options or in an option file. A setting listed in an option file takes effect each time the server starts. For example, you can set the variables in my.cnf  files on the source and replica servers as follows. 

## 17.4.10.3 Semisynchronous Replication Monitoring 

On the source: 

[mysqld] rpl_semi_sync_master_enabled=1 rpl_semi_sync_master_timeout=1000 # 1 second 

On each replica: 

[mysqld] rpl_semi_sync_slave_enabled=1 

The plugins for the semisynchronous replication capability expose several system and status variables that you can examine to determine its configuration and operational state. 

The system variable reflect how semisynchronous replication is configured. To check their values, use SHOW VARIABLES : 

mysql> SHOW VARIABLES LIKE ’rpl_semi_sync%’; 

The status variables enable you to monitor the operation of semisynchronous replication. To check their values, use SHOW STATUS : 

mysql> SHOW STATUS LIKE ’Rpl_semi_sync%’; 

When the source switches between asynchronous or semisynchronous replication due to commit-blocking timeout or a replica catching up, it sets the value of the Rpl_semi_sync_master_status  status variable appropriately. Automatic fallback from semisynchronous to asynchronous replication on the source means that it is possible for the rpl_semi_sync_master_enabled  system variable to have a value of 1 on the source side even when semisynchronous replication is in fact not operational at the moment. You can monitor the Rpl_semi_sync_master_status  status variable to determine whether the source currently is using asynchronous or semisynchronous replication. 

To see how many semisynchronous replicas are connected, check Rpl_semi_sync_master_clients . 

The number of commits that have been acknowledged successfully or unsuccessfully by replicas are indicated by the Rpl_semi_sync_master_yes_tx  and Rpl_semi_sync_master_no_tx  variables. 

On the replica side, Rpl_semi_sync_slave_status  indicates whether semisynchronous replication currently is operational. 

## 17.4.11 Delayed Replication 

MySQL supports delayed replication such that a replica server deliberately executes transactions later than the source by at least a specified amount of time. This section describes how to configure a replication delay on a replica, and how to monitor replication delay. 

