asked 115k views
3 votes
A user executes the statement; PURGE BINARY LOGS TO 'mysql-bin.010'; What is the result?

a) It deletes all binary log files, except 'mysql-in.010'.
b) It deletes all binary log files up to and including 'mysql-bin.010'.
c) It deletes all binary log files before 'mysql-bin.010'.
d) It deletes all binary log files after 'mysql-bin.010'.

asked
User Tparker
by
7.8k points

1 Answer

2 votes

Final answer:

Executing the statement 'PURGE BINARY LOGS TO 'mysql-bin.010'' deletes all binary log files before 'mysql-bin.010', not including the specified log file or any following it. This helps manage server disk space.

Step-by-step explanation:

When the statement PURGE BINARY LOGS TO 'mysql-bin.010' is executed, the result is that it deletes all binary log files before 'mysql-bin.010'. This means that 'mysql-bin.010' and any subsequent binary log files will remain on the server, while all the binary log files that were generated before 'mysql-bin.010' will be removed. Binary logs are used in MySQL for replication and data recovery purposes, so purging them helps to manage disk space on the server by deleting the logs that are no longer needed.

answered
User Mike Demidov
by
8.9k points