$ vim /etc/my.cnf
# 以下を追加
expire_logs_days = 14
MySQLを再起動。
再起動無しで設定するには GLOBAL VARIABLES を設定する。
> show global variables like 'expire_logs_days';
+------------------+-------+
| Variable_name | Value |
+------------------+-------+
| expire_logs_days | 0 |
+------------------+-------+
> set global expire_logs_days = 14;
> show global variables like 'expire_logs_days';
+------------------+-------+
| Variable_name | Value |
+------------------+-------+
| expire_logs_days | 14 |
+------------------+-------+