Recall & Review
beginner
What is the purpose of the binary log in MySQL?
The binary log records all changes to the database, such as INSERT, UPDATE, and DELETE statements. It helps with replication and data recovery.
Click to reveal answer
beginner
How do you enable binary logging in MySQL?
You enable binary logging by adding
log_bin=ON to the MySQL configuration file (my.cnf) and restarting the server.Click to reveal answer
beginner
What command lists all binary log files on the MySQL server?
Use
SHOW BINARY LOGS; to see all binary log files and their sizes.Click to reveal answer
intermediate
How can you safely purge old binary logs?
Use
PURGE BINARY LOGS TO 'log_name'; or PURGE BINARY LOGS BEFORE 'date'; to delete old logs and free space.Click to reveal answer
beginner
Why is managing binary logs important in MySQL?
Because binary logs can grow large and consume disk space, managing them prevents storage issues and ensures replication works smoothly.
Click to reveal answer
Which MySQL configuration option enables binary logging?
✗ Incorrect
The correct option to enable binary logging is
log_bin.What does the command
SHOW BINARY LOGS; do?✗ Incorrect
It lists all binary log files on the server along with their sizes.
Which command is used to remove binary logs before a specific date?
✗ Incorrect
The correct syntax to purge old logs before a date is
PURGE BINARY LOGS BEFORE 'date';.Why should you manage binary logs regularly?
✗ Incorrect
Binary logs can grow large and fill disk space, so managing them prevents storage problems.
Which of these is NOT a use of the binary log?
✗ Incorrect
Binary logs are not used for query optimization; they record data changes for replication and recovery.
Explain what the MySQL binary log is and why it is important.
Think about how MySQL keeps track of changes and why that matters.
You got /5 concepts.
Describe how to safely remove old binary logs in MySQL.
Consider commands that delete logs and why timing matters.
You got /4 concepts.