SQL BIN log data setting

This guide goes through how to change the SQL BIN log data setting, if its taking up too much storage space on the server.

The binary log that you are seeing use up a lot of disk space in the “data” directory is a default setting in MySQL/MariaDB that provides important functionality. The primary usage is in database replication to slave servers, which SCP does not use. However, they can also be used as an emergency restore, since the binary logs essentially allow replaying all database transactions.

You can of course turn this feature off at any point if desired.

The following settings in “C:SCPmariadb-10.2.8my.ini” configure the binary log:

log-bin = mysql-bin

Configures the file name used for the binary log, and also controls whether the feature is enabled. You may remove (or comment out) this line and restart the “oac_maria” service to disable the binary logs entirely. You can then safely remove the mysql-bin files.

expire-logs-days = 90

This is not in the config file as we ship it, but you may add it below the “log-bin” line. 90 days is the default expiry period, but you may safely reduce this number, especially if you perform backups regularly. The server will automatically prune the expired files for you upon restarting the service.

Copyright OM Digital Solutions. All Rights Reserved