MySQL 8.0 Database Administrator — Question 78
An existing asynchronous replication setup is running MySQL 8.
Which two steps are a part of implementing GTID replication? (Choose two.)
Answer options
- A. Enable GTID by executing this on the master and the slave: SET GLOBAL GTID_ENABLED=on;
- B. Execute this on the slave to enable GTID: START SLAVE IO_THREAD WITH GTID;
- C. Restart MySQL (master and slave) with these options enabled: --gtid_mode=ON --log-bin --log-slave-updates --enforce-gtid-consistency
- D. Execute this on the slave to enable GTID: RESET SLAVE; START SLAVE GTID_NEXT=AUTOMATIC;
- E. On the slave, alter the MySQL master connection setting with: ALTER channel CHANGE MASTER TO MASTER_AUTO_POSITION = 1;
- F. On the slave, alter the MySQL master connection setting with: CHANGE MASTER TO MASTER_AUTO_POSITION = 1;
Correct answer: C, F
Explanation
The correct steps for implementing GTID replication involve setting the necessary MySQL options during a restart, which is captured in option C, and adjusting the master connection settings, which is found in option F. Options A, B, D, and E do not correctly apply to the GTID replication setup process required in MySQL 8.