After a recent MySQL upgrade i found several servers reporting cron errors via email - relating to Mod Security.

DBI connect('modsec:localhost','modsec',...) failed: Access denied for user 'modsec'@'localhost' (using password: YES) at /etc/cron.hourly/modsecparse.pl

It appeared as thought the modsec user didn't have access to the mod security database/table.

Solution:

If you are still using the old cPanel/Apache 1.3

  1. In WHM select Plug-ins
  2. Remove then re-install mod_security.

If you installed Apache2 mod_security with easyapache3 on cPanel 11 and you get the error

  1. Check the password at /etc/cron.hourly/modsecparse.pl
  2. Adjust the password of modsec user through WHM >  phpMyAdmin > Privileges

You should then find Mod Security working as normal.