Clean space from mysql-bin logs

Today, I was found out one of customer server filled up with mysql-bin log and the server var space fully utilized.

From their MySQL path, file as below have filled up,

As mysql-bin used to record the event of the MySQL databases and it is not necessary to keep the log from the first day of the databases create until the present date, hence I would suggest for maximum 30 days of logs to be kept.

To disable the mysql-bin, simply remove log-bin from the MySQL configuration file, /etc/.my.cnf or my.ini.
log-bin = mysql-bin

Otherwise, keep only 30 days of log,
expire_logs_days = 30

tailwatchd failed: A restart was attempted automagically


Service Check Method: [check command] tailwatchd is not running



/usr/local/cpanel/libexec/tailwatchd –status

Then restart the cPanel services.
service cpanel restart

If the issue still not fix, may update cPanel,
/scripts/upcp –force

Debugging Perl/CGI Scripts



use CGI::Carp qw(carpout);


To setup error to send to browser,

use CGI::Carp qw(fatalsToBrowser);
die “Couldn’t open log file”;
