13.7.7.1 SHOW BINARY LOGS Statement语句

SHOW BINARY LOGS
SHOW MASTER LOGS

Lists the binary log files on the server. 列出服务器上的二进制日志文件。This statement is used as part of the procedure described in Section 13.4.1.1, “PURGE BINARY LOGS Statement”, that shows how to determine which logs can be purged. 该语句用作第13.4.1.1节,“清除二进制日志语句”中所述程序的一部分,该语句说明了如何确定可以清除哪些日志。SHOW BINARY LOGS requires the REPLICATION CLIENT privilege (or the deprecated SUPER privilege).SHOW BINARY LOGS需要REPLICATION CLIENT权限(或不推荐使用的SUPER权限)。

Encrypted binary log files have a 512-byte file header that stores information required for encryption and decryption of the file. 加密的二进制日志文件有一个512字节的文件头,用于存储文件加密和解密所需的信息。This is included in the file size displayed by SHOW BINARY LOGS. 这包括在SHOW BINARY LOGS显示的文件大小中。The Encrypted column shows whether or not the binary log file is encrypted. Encrypted列显示二进制日志文件是否加密。Binary log encryption is active if binlog_encryption=ON is set for the server. 如果为服务器设置了binlog_encryption=ON,则二进制日志加密处于活动状态。Existing binary log files are not encrypted or decrypted if binary log encryption is activated or deactivated while the server is running.如果在服务器运行时激活或停用二进制日志加密,则不会加密或解密现有的二进制日志文件。

mysql> SHOW BINARY LOGS;
+---------------+-----------+-----------+
| Log_name      | File_size | Encrypted |
+---------------+-----------+-----------+
| binlog.000015 |    724935 |       Yes |
| binlog.000016 |    733481 |       Yes |
+---------------+-----------+-----------+

SHOW MASTER LOGS is equivalent to SHOW BINARY LOGS.SHOW MASTER LOGS相当于SHOW BINARY LOGS