Skip to content

Instantly share code, notes, and snippets.

@grambas
Last active November 2, 2020 19:00
Show Gist options
  • Save grambas/aec61b74b2e76ef0749b8d2f6aa74e28 to your computer and use it in GitHub Desktop.
Save grambas/aec61b74b2e76ef0749b8d2f6aa74e28 to your computer and use it in GitHub Desktop.

Revisions

  1. grambas revised this gist Nov 2, 2020. 1 changed file with 4 additions and 1 deletion.
    5 changes: 4 additions & 1 deletion clean_mysql_bin_logs.sh
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,6 @@
    docker exec -it -u root DB_CONTAINER_NAME /bin/bash
    mysql -u root -p
    PURGE BINARY LOGS BEFORE NOW();
    PURGE BINARY LOGS BEFORE NOW(); # OR RESET MASTER;

    # check option
    SELECT * FROM performance_schema.global_variables WHERE VARIABLE_NAME IN ('log_bin');
  2. grambas renamed this gist Oct 18, 2020. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  3. grambas created this gist Oct 18, 2020.
    3 changes: 3 additions & 0 deletions clean_mysql_bin_logs.bash
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,3 @@
    docker exec -it -u root DB_CONTAINER_NAME /bin/bash
    mysql -u root -p
    PURGE BINARY LOGS BEFORE NOW();