Q1072
What causes a replication master server to delete all the binary log files even if they are still in use?
A.
RESET MASTER LOGS
AnswerB.
FLUSH TABLES
C.
RELOAD
D.
FLUSH LOGS
Answer: Option A
Solution
Answer: Option A
Solution:
This question is about managing binary log files in MySQL, which are crucial for replication. The binary log records all changes made to the database. Here's what each option does:
Option A: RESET MASTER LOGS
This command is specifically designed to delete all existing binary log files. It's usually used when you want to start a new log sequence. This is the correct answer because it directly removes the binary logs, even if they're still needed for replication.
Option B: FLUSH TABLES
This command flushes all the data from the tables' internal memory to disk, but it doesn't affect the binary log files.
Option C: RELOAD
This command reloads the grant tables, essentially refreshing the permissions information. It doesn't touch the binary log files.
Option D: FLUSH LOGS
This command forces the binary log to be written to disk, but it doesn't delete any existing files.
Therefore, the correct answer is Option A: RESET MASTER LOGS.
This command is the only one that directly deletes all binary log files, regardless of whether they're currently in use.