content_image/662419.jpg content_image/662426.jpg
## A.14 MySQL 8.0 FAQ: Replication 

<img src='content_image/662419.jpg'>

## Note 

This example uses https://ninja-build.org/ as a build system instead of make. 

In the following section, we provide answers to questions that are most frequently asked about MySQL Replication. 

<img src='content_image/662426.jpg'>

A.14.1. Must the replica be connected to the source all the time? 

No, it does not. The replica can go down or stay disconnected for hours or even days, and then reconnect and catch up on updates. For example, you can set up a source/replica relationship over a dial-up link where the link is up only sporadically and for short periods of time. The implication of this is that, at any given time, the replica is not guaranteed to be in synchrony with the source unless you take some special measures. 

To ensure that catchup can occur for a replica that has been disconnected, you must not remove binary log files from the source that contain information that has not yet been replicated to the replicas. Asynchronous replication can work only if the replica is able to continue reading the binary log from the point where it last read events. 

A.14.2. Must I enable networking on my source and replica to enable replication? 

Yes, networking must be enabled on the source and replica. If networking is not enabled, the replica cannot connect to the source and transfer the binary log. Verify that the skip_networking  system variable has not been enabled in the configuration file for either server. 

A.14.3. How do I know how late a replica is compared to the source? In other words, how do I know the date of the last statement replicated by the replica? 

Check the Seconds_Behind_Master  column in the output from SHOW REPLICA | SLAVE STATUS . See Section 17.1.7.1, “Checking Replication Status” . 

