(已解决)ERROR 3683 (HY000): The option expire_logs_days and binlog_expire_logs_seconds cannot be used

  • 问题描述

    设置expire_logs_days参数出现如下问题:

    ERROR 3683 (HY000): The option expire_logs_days and binlog_expire_logs_seconds cannot be used together. Please use binlog_expire_logs_seconds to set the expire time (expire_logs_days is deprecated)
    
  • 解决方案

    这个参数的意思是设置日志失效日期为3天,默认是30天,比较耗费磁盘空间。

    这个参数已经弃用, 改用binlog_expire_logs_seconds ,单位由改为,如下设置1天。

    set global binlog_expire_logs_seconds=60*60*24;

    可以通过show variables like '%expire%';查看更改结果。

    永久改动可以找到/etc/mysql/my.cnfUbuntu)文件写入配置。

  • References

  1. MySQL 8.0.12 binlog参数binlog_expire_logs_seconds
  2. Is it safe to delete mysql-bin files?
  3. How do I find the MySQL my.cnf location
发布了871 篇原创文章 · 获赞 1322 · 访问量 97万+

猜你喜欢

转载自blog.csdn.net/The_Time_Runner/article/details/105610213