MySQL purge master logs.

Wednesday, April 12th, 2006

MySQL 5.0 Reference Manual :: 13.6.1.1 PURGE MASTER LOGS Syntax

There’s a neat little trick in the comments section about how to purge the binary MySQL logs after 30 days:

PURGE MASTER LOGS BEFORE DATE_SUB( NOW(), INTERVAL 31 DAY);