バイナリログ
CautionBinary logs
SHOW BINARY LOGS;
Lists, decodes and purges binlogs — your point-in-time recovery material and a classic disk hog.
Examples
PURGE BINARY LOGS BEFORE NOW() - INTERVAL 7 DAY;Purge logs older than 7 days
Syntax
SHOW BINARY LOGS; / mysqlbinlog <file> / PURGE BINARY LOGS BEFORE '<date>';
Before you run it
Purging unread logs breaks replicas.
Related commands
- SHOW REPLICA STATUSReplication status
- Dump / backupBack up a DB
The same reference, with no signal at all
Every command and flow from this site, held on your device and searchable with no connection. Free to install, no ads.
Get it free on the App Store