/etc/cron.hourly/modsecparse.pl - You have an error in your SQL syntax

Sindre

Well-Known Member
Aug 25, 2008
46
0
56
On a new server I have set up I get these emails:


Code:
Subject: Cron <root@server> run-parts /etc/cron.hourly
/etc/cron.hourly/modsecparse.pl:

DBD::mysql::st execute failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'get, host, mod_security_message, mod_security_action) VALUES('111.111.111.111', '2' at line 1 at /etc/cron.hourly/modsecparse.pl line 123, <$al_fh> line 15.

Mod security was installed through EasyApache. I have replaced MySQL with Percona 5.6.

Does anyone have any suggestion as to what can be the problem?

Thanks,
Sindre
 

kernow

Well-Known Member
Jul 23, 2004
1,031
62
178
cPanel Access Level
Root Administrator
modesc cron stores its logs in a Mysql database, since you have removed Mysql in favour of percona you will need to either stop/delete the cron or edit it to accomodate percona.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,270
463
Hello :)

You will need to remove this cron job or modify it so it's compatible with your custom Percona installation. Note that Mod_Security itself should still function normally.

Thank you.
 

Sindre

Well-Known Member
Aug 25, 2008
46
0
56
Hello :)

You will need to remove this cron job or modify it so it's compatible with your custom Percona installation. Note that Mod_Security itself should still function normally.

Thank you.
Ok, but do you know what in the cron script that needs to be modified? As far as I know, Percona should be compatible with standard SQL queries, so it must be something else. The error says there is an error in the syntax. I check the script but couldn't find anything special. Also, I have moved the MySQL data dir to a different partition if that makes a difference.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,270
463
Feel free to open a support ticket using the link in my signature so we can take a closer look. You can post the ticket number here so we can update this thread with the outcome.

Thank you.