Fixing MySQL password for "modsec" user, and modsecparse.pl
First off, is modsecparse.pl (the one in /etc/cron.hourly) still needed/used with the 11.46 implementation of ModSecurity?
Secondly, I was working with it and found that it had the wrong password for the modsec mysql user. I set the mysql user to use the password listed in /etc/cron.hourly/modsecparse.pl, and now WHM cannot access the database. When I load WHM and go to ModSecurity" Tools I'm greeted with this error:
Error: The following exception has occurred: API failure: Cpanel::DBI::Mysql connect('','modsec',...) failed: Access denied for user 'modsec'@'localhost' (using password: YES) at /usr/local/cpanel/Cpanel/MysqlUtils/Connect.pm line 156.
I noticed this when I restart the cpanel service from CLI:
Thoughts? I tried upcp --force, a fresh easyapache, and restarting everything, nothing seems to "straighten out" the password that WHM is trying to use to connect to the modsec database.
I noticed this when I restart the cpanel service from CLI:
Cpanel::TailWatch::ModSecLog appears to have unprocessed SQL in /var/cpanel/sql/modseclog.sql.Thoughts? I tried upcp --force, a fresh easyapache, and restarting everything, nothing seems to "straighten out" the password that WHM is trying to use to connect to the modsec database.
-
We use 11.46 with mod security and the file modsecparse.pl does not exist. (other than in cpeasyapache/src ) If you have have it then this link might be of use: [url=http://www.cpanelkb.net/database-connection-problem-on-modsecparse-pl/]Database connection problem on modsecparse.pl - cPanel KnowledgeBase 0 -
cPanel got back to me, modsecparse.pl is indeed deprecated in 11.46 The WHM error was fixed by putting the proper mysql password in this file: /var/cpanel/modsec_db_pass 0
Please sign in to leave a comment.
Comments
2 comments