Created
June 20, 2018 14:39
-
-
Save kzap/a4a95c1315b3419c794de9c4c5da7af0 to your computer and use it in GitHub Desktop.
How to clean up logs when running MHA on a Master Replica MySQL Setup
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
# On Master Server purge binary logs up to latest log file | |
PURGE BINARY LOGS TO 'mysql-bin.010'; | |
# On Slave Servers, clear relay logs | |
SET GLOBAL relay_log_purge=1; | |
FLUSH LOGS; | |
# wait for relay logs to get deleted | |
SET GLOBAL relay_log_purge=0; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment