JAEN

SQL

バイナリログ

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

The same reference, with no signal at all

Every command on this site, held on your device. The app adds 632 more: 1,510 commands and 120 fix flows, searchable with no connection. Free to install, no ads (some content is a one-time purchase).

Get it free on the App Store