I've just setup MariaDB replication with 2 slaves in Debian 11 (Bullseye). I'm a bit alarmed to see the file size reach such a size without log rotation:
-rw-rw---- 1 mysql adm 297394983 Dec 8 05:55 master-bin.000001 -rw-rw---- 1 mysql adm 33 Dec 5 19:32 master-bin.index
In the steps to setup replication I modified the master MariaDB /etc/mysql/my.cnf file [mariadb] section
[mariadb] log-bin server_id=1 log-basename=master1 binlog-format=mixed
It isn't clear to me how to setup log rotation for this in a way that isn't going to break the 2 slaves. I am wondering if it is possible to setup master-bin.000001 to rotate once a day and delete old ones after 28 days.
I have searched the web. I am seeing comments about slave log rotation online. It isn't "clicking" how to do this for this master files.