Phenomenon: Web site access is getting slower, finally inaccessible, after the check found that the disk is full
Analysis Process and solution: Usually this problem should be logged on to the server to check the disk, memory and process use, through top, df–h and free–m to check, found that the disk space is full. Further through the du–sh to the directory can be checked, found that MySQL Binlog occupied space is too large. Here's how to clean up Binlog: 1) Set log retention length expire_logs_days automatically deleteView current journal days saved:Show variables like '%expire_logs_days% ';The default is 0, which is logs, which can be temporarily applied by setting global parameters:set global expire_logs_days=7;set to keep only 7 days Binlog, the next time you restart mysql This parameter will fail by default, so you need to set it in My.cnfexpire_logs_days = 7 2) manually delete binlog (purge binary logs)used to delete all binary logs that are listed in the log index before the specified log or date. These logs are also logged from the log index filePURGE {MASTER | BINARY} LOGS to ' Log_name 'PURGE {MASTER | BINARY} LOGS before ' date 'For example:PURGE MASTER LOGS to ' mysql-bin.010 ';PURGE MASTER LOGS before ' 2008-06-22 13:00:00 ';PURGE MASTER LOGS before Date_sub (now (), INTERVAL 3 day);