MySQL 8.0 Database Administrator — Question 133
Your MySQL environment has asynchronous position based-replication with one master and one slave.
The slave instance had a disk I/O problem, so it was stopped.
You determined that the slave relay log files were corrupted and unusable, but no other files are damaged.
You restart MySQL Server.
How can replication be restored?
Answer options
- A. The slave relay logs should be deleted; then execute START SLAVE;
- B. The relay logs from the master should be used to replace the corrupted relay logs.
- C. The slave relay logs should be deleted; execute CHANGE MASTER to adjust the replication relay log file name, then issue start SLAVE;
- D. The slave needs to be restored from backup.
Correct answer: B
Explanation
The correct answer is B because using the relay logs from the master allows the slave to catch up with the changes that were not processed due to the corruption. Options A and C involve deleting logs without properly addressing the corruption issue, which will not resolve the replication problem. Option D suggests restoring from a backup, which is unnecessary when the master logs can be utilized to restore the replication process effectively.