content_image/728669.jpg content_image/728675.jpg
To resume binary logging log_bin  must be enabled again, which requires a server restart. This setting provides backward compatibility with older versions of MySQL. 

• binlog_expire_logs_seconds 

<img src='content_image/728669.jpg'>

Sets the binary log expiration period in seconds. After their expiration period ends, binary log files can be automatically removed. Possible removals happen at startup and when the binary log is flushed. Log flushing occurs as indicated in Section 5.4, “MySQL Server Logs” . 

The default binary log expiration period is 2592000 seconds, which equals 30 days (30*24*60*60 seconds). The default applies if neither binlog_expire_logs_seconds  nor the deprecated system variable expire_logs_days  has a value set at startup. If a non-zero value for one of the variables binlog_expire_logs_seconds  or expire_logs_days  is set at startup, this value is used as the binary log expiration period. If a non-zero value for both of those variables is set at startup, the value for binlog_expire_logs_seconds  is used as the binary log expiration period, and the value for expire_logs_days  is ignored with a warning message. 

To disable automatic purging of the binary log, specify a value of 0 explicitly for binlog_expire_logs_seconds , and do not specify a value for expire_logs_days . For compatibility with earlier releases, automatic purging is also disabled if you specify a value of 0 explicitly for expire_logs_days  and do not specify a value for binlog_expire_logs_seconds . In that case, the default for binlog_expire_logs_seconds  is not applied. 

To remove binary log files manually, use the PURGE BINARY LOGS  statement. See Section 13.4.1.1, “PURGE BINARY LOGS Statement” . 

• binlog_format 

<img src='content_image/728675.jpg'>

