How to fix Database connection problem on modsecparse.pl file?
Are you receiving the Modsec Database Failure cron error continuously ? Mostly these mod security error caused due to mysql connection problem. You should check your mysql connectivity on modsecparse.pl file.
root@gopal [~]#/etc/cron.hourly/modsecparse.pl: DBI connect('modsec:localhost','modsec',...) failed: Access denied for user 'modsec'@'localhost' (using password: YES) at /etc/cron.hourly/modsecparse.pl line 19 Unable to connect to mysql database at /etc/cron.hourly/modsecparse.pl line 19.
Also check with your apache webserver whether the mod_security installed properly. Use the following commands to verify the installation status and confirm if they are loading.
# find /usr/local/apache -regex ".*modsec.*\|.*mod_security.*" | sort # /usr/local/apache/bin/httpd -l | grep "unique_id" # /usr/local/apache/bin/httpd -M | egrep "sec|unique_id"