Home >Database >Mysql Tutorial >3 ways to clear binlog in MySQL!
-- mysql delete log online
1 mysql command purge
mysql> purge master logs to "mysql-bin.000410"; Query OK, 0 rows affected (3.71 sec)
2 Manual rm cleanup
rm -rf mysql-bin.00040*; vim mysql-bin.log.index
Purge Remove the mysql-bin.0004** record inside
3 Parameter cleanup
set global expire_logs_days=5;
System automatic cleanup
The above are 3 in MySQL How to clear binlog! Contents, please pay attention to the PHP Chinese website (www.php.cn) for more related content!