Delete / Purge MySQL bin log file on linux server:
Note: First check all master and slave server file location mysql-bin log file location, it shoud be updated :
Then purge old bin log files:
Purge Master Logs
If you ARE replicating, then you need to periodically RESET MASTER or PURGE MASTER LOGS to clear out the old logs as those files are necessary for the proper operation of replication. Use following command to purge master logs:
login to mysql prompt:
mysql > PURGE BINARY LOGS TO 'mysql-bin.03';
OR
$ mysql -u root -p 'MyPassword' -e "PURGE BINARY LOGS TO 'mysql-bin.03';"
OR
$ mysql -u root -p 'MyPassword' -e "PURGE BINARY LOGS BEFORE '2008-12-15 10:06:06';"
Note: First check all master and slave server file location mysql-bin log file location, it shoud be updated :
Then purge old bin log files:
Purge Master Logs
If you ARE replicating, then you need to periodically RESET MASTER or PURGE MASTER LOGS to clear out the old logs as those files are necessary for the proper operation of replication. Use following command to purge master logs:
login to mysql prompt:
mysql > PURGE BINARY LOGS TO 'mysql-bin.03';
OR
$ mysql -u root -p 'MyPassword' -e "PURGE BINARY LOGS TO 'mysql-bin.03';"
OR
$ mysql -u root -p 'MyPassword' -e "PURGE BINARY LOGS BEFORE '2008-12-15 10:06:06';"
No comments:
Post a Comment