You can use this script to purge master logs older than the day of the current log. It checks the slaves are not using the older logs first.
Some prechecks:
1) create a repl_client user on each slave - i.e
GRANT REPLICATION CLIENT ON *.* TO 'repl_client'@'mk-dbxx-1' IDENTIFIED BY 'r3pl';
2) Put the master and slave user, pwd and hosts in the section below.
3) Set savedays to number of days of logs to keep if more than today+1.
4) Make sure perl DBD and CALC modules are installed.
perl –v ,
instmodsh (and enter l to list modules)
5) The purge statement will not work if the "show master logs;" doesn't match up with the actual log files on disk. This …
[Read more]