Database connection problem on modsecparse.pl

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.

[email protected] [~]#/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"
 
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

cPHulk Brute Force Protection

WHM/cPanel has a service, protected from Brute Force attack, which is called “cPHulk Brute Force...

Enable SSH key authorized login without root password

You need to generate SSH Key ( the private key )on your cpanel server and then update remote...

How can I Redirect URLs in cPanel

Login your cpanel 1. Click the Redirects button on the front page under the “domains” 2. Enter...

Enable Custom php.ini for Fast CGI

With fast-cgi, custom php.ini needs to be in the cgi-bin folder. 1) Move php.ini to cgi-bin...

ConfigServer Firewall CSF installation

ConfigServer firewall is a popular linux firewall security suite. It is easy to install, flexible...

Powered by WHMCompleteSolution