Oracle MySQL 5.7 Database Administrator — Question 8
You want to create a temporary table named OLD_INVENTORY in the OLD_INVENTORY database on the master server. This table is not to be replicated to the slave server.
Which two changes would ensure that the temporary table does not propagate to the slave? (Choose two.)
Answer options
- A. Set binlog_format=MIXED with the --replicate-ignore-temp-table option.
- B. Use the --replicate-do-db, --replicate-do-table, or --replicate-wild-do-table option with the value equal to OLD_INVENTORY.
- C. Change the binlog_format option to ROW and restart mysqld before you create the OLD_INVENTORY table.
- D. Stop SQL_THREAD on the slave until you have finished using the OLD_INVENTORY temporary table.
- E. Use the --replicate-ignore-table option with the value equal to OLD_INVENTORY.OLD_INVENTORY and restart mysqld before creating the temporary table.
Correct answer: B, E
Explanation
Options B and E are correct because they specifically prevent the OLD_INVENTORY temporary table from being replicated to the slave. Option B allows you to limit replication only to the OLD_INVENTORY database, while option E explicitly ignores the OLD_INVENTORY table in replication. The other options either do not address the replication issue directly or are not effective methods for preventing the temporary table from being replicated.