Replication logs
The master's binary logs and the slave's replication logs keep growing while the masters perform their normal activities and the slaves replicate their work. They need to be rotated and old files need to be deleted, to avoid running out of disk space. This section explains how to do this.
Rotating the binary log
The current binary log filename is determined by the --log-bin
startup option. If an extension is specified, it is ignored and only the basename is used. By default, the binary log is written into the data
directory. If the filename is not set, the default value is the hostname followed by the -bin
suffix.
The max_binlog_size
server variable determines the maximum size of the current file, in bytes. When this size is reached, the binary log rotates: the current file is renamed and a new file with the same name is created. The archive files have names that follow this pattern: <basename>.<prog_id>
where basename
is identical to the current file's basename...