SHOW BINARY LOGS; set global binlog_expire_logs_seconds=60*60*24; show variables like '%expire%'; flush privileges; 永久改动可以找到/etc/mysql/my.cnf(Ubuntu)文件写入配置。