Created
July 15, 2021 08:06
-
-
Save bhaskar-f22/ca39ab3e8f2c9f62ca0d1396d165d6ea to your computer and use it in GitHub Desktop.
Reclam unused space from DB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- First opthimize the table where you want to claim space | |
opthimize table <table-name>; | |
-- Delete logs except latest log file | |
show binary logs; | |
PURGE BINARY LOGS TO 'mysql-bin.006920'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment