Skip to content

Instantly share code, notes, and snippets.

@WillSquire
Last active July 11, 2017 13:46
Show Gist options
  • Select an option

  • Save WillSquire/a43c3f87f3ae33efd0679b1db16b4010 to your computer and use it in GitHub Desktop.

Select an option

Save WillSquire/a43c3f87f3ae33efd0679b1db16b4010 to your computer and use it in GitHub Desktop.
Purge binary logs

Login to MySQL (requires a root account or equivilant):

mysql -u <username> -p

To purge binary logs before the last 3 days:

PURGE BINARY LOGS BEFORE NOW() - INTERVAL 3 DAY;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment