Q&A

Q1:Does a slave always need to be connected to a master?
A1: No. The connection between the two can go down, or either system can go down, but when they connect again, replication will pick up where it left off.

Of course, the slave will not have an up-to-date copy of the master while it's not connected!

There's no need to tell the slave when the connection resumes; the slave just keeps retrying to connect to the master (once a minute by default).

Q2:Can I make updates to the slave server?
A2: In most cases, no. If your slave is replicating all databases from the master, and if a unique key violation may occur, no updates should be made to the slave or replication will eventually break down.

But if your slave is replicating only certain databases ...

Get Sams Teach Yourself MySQL in 21 Days, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.