#查看当前过期时间,0为无限制
show variables like '%logs_days%';
#临时生效
set global expire_logs_days=7;
#查看大小限制
show variables like ‘max_binlog_size’;
#vi /etc/my.cnf,[mysqld]区域如下
log-bin=/xxx/xxx/xxxxxx/mysql102-bin
expire_logs_days = 7
max_binlog_size = 500M
来源:CSDN
作者:VIP099
链接:https://blog.csdn.net/VIP099/article/details/104720043