当开启mysql数据库主从时,会产生大量如mysql-bin.00000* log的文件,这会大量耗费您的硬盘空间。
mysql-bin.000001
mysql-bin.000002
mysql-bin.000003
mysql-bin.000004
mysql-bin.000005
…
有三种解决方法:
1.关闭mysql主从,关闭binlog;
2.开启mysql主从,设置expire_logs_days;
3.手动清除binlog文件,> PURGE MASTER LOGS TO ‘MySQL-bin.010′;