Disk Optimization
1. Binary Log Optimization
If you have limited disk resource you don’t want to keep all binary log. 10 days enough for it.
To learn current expire days
mysql> show variables like 'expire_logs_days';
To set expire days 10
mysql> set global expire_logs_days=10;
Check
mysql> show variables like 'expire_logs_days';
For flush binary logs
mysql> flush binary logs;
Add this config to “/etc/my.conf”
expire_logs_days = 10