【dbdao.com MySQL OCP认证专题】- MySQL 5.6 - OCP 考题讲解 - 11
【dbdao.com MySQL OCP认证专题】- MySQL 5.6 - OCP 考题讲解11.
You are using replication and the binary log files on your master server consume a lot of disk space.
Which two steps should you perform to safely remove some of the older binary log files?
A. Ensure that none of the attached slaves are using any of the binary logs you want to delete.
B. Use the command PURGE BINARY LOGS and specify a binary log file name or a date and time to remove unused files.
C. Execute the PURGE BINARY LOGE NOT USED command.
D. Remove all of the binary log files that have a modification date earlier than today.
E. Edit the .index file to remove the files you want to delete.
---------------------------------------------------------------------------
答案:AB
分析:
A是必须要保证的,你的删除的肯定不能正被slave使用啦。
PURGE LOGS语法所做操作会对.index文件进行自动更新。因此B正确,E错:PURGE { BINARY | MASTER } LOGS { TO 'log_name' | BEFORE datetime_expr }C错,无此语法。
D错,具体清理到什么位置需要按照SHOW SLAVE STATUS来查看,而不是武断地确定删除早于今天的binary log文件。
参考:
http://dev.mysql.com/doc/refman/5.7/en/purge-binary-logs.html
页:
[1]