Challenge - 5 Problems
Binary Log Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ query_result
intermediate2:00remaining
Check Current Binary Log File
What is the output of the following query that shows the current binary log file in MySQL?
MySQL
SHOW MASTER STATUS;
Attempts:
2 left
💡 Hint
SHOW MASTER STATUS shows the current binary log file and position used for replication.
✗ Incorrect
SHOW MASTER STATUS returns a single row with the current binary log file name and position, which is essential for replication and backup.
🧠 Conceptual
intermediate1:30remaining
Purpose of Binary Logs
Which of the following best describes the main purpose of binary logs in MySQL?
Attempts:
2 left
💡 Hint
Think about what binary logs record and how they are used in replication.
✗ Incorrect
Binary logs record all changes (like INSERT, UPDATE, DELETE) to the database, which helps in replication and point-in-time recovery.
📝 Syntax
advanced2:30remaining
Enable Binary Logging in MySQL
Which of the following configuration lines correctly enables binary logging in the MySQL server configuration file (my.cnf)?
Attempts:
2 left
💡 Hint
Binary logging must be enabled under the [mysqld] section with log_bin set to a filename prefix.
✗ Incorrect
To enable binary logging, set log_bin to a filename prefix under [mysqld]. binlog_format controls the format (ROW, STATEMENT, MIXED).
❓ optimization
advanced2:30remaining
Reducing Binary Log Size
Which method is the best way to reduce the size of binary logs without losing replication data?
Attempts:
2 left
💡 Hint
Think about automatic cleanup of old logs versus manual or disabling logging.
✗ Incorrect
Setting expire_logs_days causes MySQL to automatically remove old binary logs after the specified days, reducing disk usage safely.
🔧 Debug
expert3:00remaining
Binary Log Corruption Detection
You suspect a binary log file is corrupted. Which command will help you verify the integrity of binary log files?
Attempts:
2 left
💡 Hint
Look for a mysqlbinlog option that checks or verifies the log file.
✗ Incorrect
The --verify option of mysqlbinlog checks the binary log file for corruption and reports errors if found.