Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

modsecparse.pl / mysql issues

Discussion in 'Security' started by katmai, Jan 6, 2008.

  1. katmai

    katmai Well-Known Member

    Joined:
    Mar 13, 2006
    Messages:
    533
    Likes Received:
    0
    Trophy Points:
    166
    Location:
    Brno, Czech Republic
    hi,

    i moved mysql to another drive, and i am getting these errors

    /etc/cron.hourly/modsecparse.pl:

    DBI connect('modsec:localhost','modsec',...) failed: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) at /etc/cron.hourly/modsecparse.pl line 19
    Unable to connect to mysql database at /etc/cron.hourly/modsecparse.pl line 19.

    [root@viper ~]# ls -la /var/lib/mysql/mysql.sock
    lrwxrwxrwx 1 root root 23 Jan 6 20:11 /var/lib/mysql/mysql.sock -> /home3/mysql/mysql.sock


    the socket exists.

    in cpanel - service manager mysql looks as down, and eximstats the same.

    any idea where is the config for modsec and chkserv so that i could set the new mysql.sock location? maybe that will work.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. katmai

    katmai Well-Known Member

    Joined:
    Mar 13, 2006
    Messages:
    533
    Likes Received:
    0
    Trophy Points:
    166
    Location:
    Brno, Czech Republic
    already did that in the first place.

    as you already know the socket gets created once you start mysql. so it would be impossible for me to create a symlink to an inexistent socket.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. katmai

    katmai Well-Known Member

    Joined:
    Mar 13, 2006
    Messages:
    533
    Likes Received:
    0
    Trophy Points:
    166
    Location:
    Brno, Czech Republic
    lol i wrote in advance:))
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,460
    Likes Received:
    21
    Trophy Points:
    463
    Location:
    Go on, have a guess
    One thing, make sure you have set the datadir and socket directives in /etc/my.cnf to the real locations (not the symlink) and restart mysql.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. katmai

    katmai Well-Known Member

    Joined:
    Mar 13, 2006
    Messages:
    533
    Likes Received:
    0
    Trophy Points:
    166
    Location:
    Brno, Czech Republic
    bumping the thread.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,563
    Likes Received:
    43
    Trophy Points:
    308
    cPanel Access Level:
    Root Administrator
    Does command line mysql still work?

    Try logging into MySQL as different users. Log in as the mod sec user.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. Solokron

    Solokron Well-Known Member

    Joined:
    Aug 8, 2003
    Messages:
    850
    Likes Received:
    1
    Trophy Points:
    168
    Location:
    Seattle
    cPanel Access Level:
    DataCenter Provider
    We see this from time to time where modsec works fine but access to the logging db for the whm plugin is missing.

    Code:
    vi /etc/cron.hourly/modsecparse.pl
    #Copy the password. Close out.

    Code:
    mysql
    create database modsec;
    grant all privileges on modsec.* to modsec@localhost identified by 'thepassword';
    quit
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice