content_image/769411.jpg content_image/769418.jpg content_image/769419.jpg
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” . 

• log_bin 

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

Shows the status of binary logging on the server, either enabled ( ON ) or disabled ( OFF ). With binary logging enabled, the server logs all statements that change data to the binary log, which is used for backup and replication. ON  means that the binary log is available, OFF  means that it is not in use. The -- log-bin  option can be used to specify a base name and location for the binary log. 

In earlier MySQL versions, binary logging was disabled by default, and was enabled if you specified the --log-bin  option. From MySQL 8.0, binary logging is enabled by default, with the log_bin system variable set to ON , whether or not you specify the --log-bin  option. The exception is if you use mysqld  to initialize the data directory manually by invoking it with the --initialize  or -- initialize-insecure  option, when binary logging is disabled by default. It is possible to enable binary logging in this case by specifying the --log-bin  option. 

If the --skip-log-bin  or --disable-log-bin  option is specified at startup, binary logging is disabled, with the log_bin  system variable set to OFF . If either of these options is specified and -- log-bin  is also specified, the option specified later takes precedence. 

For information on the format and management of the binary log, see Section 5.4.4, “The Binary Log” . 

• log_bin_basename 

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

Holds the base name and path for the binary log files, which can be set with the --log-bin  server option. The maximum variable length is 256. In MySQL 8.0, if the --log-bin  option is not supplied, the default base name is binlog . For compatibility with MySQL 5.7, if the --log-bin  option is supplied with no string or with an empty string, the default base name is host_name -bin , using the name of the host machine. The default location is the data directory. 

• log_bin_index 

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

