Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 7 of 7
  1. #1
    Member
    Join Date
    Mar 2006
    Location
    Brno, Czech Republic
    Posts
    510

    Default modsecparse.pl / mysql issues

    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.
    Not everything that is counted counts and not everything that counts can be counted

  2. #2
    Member
    Join Date
    Mar 2006
    Location
    Brno, Czech Republic
    Posts
    510

    Default

    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.
    Not everything that is counted counts and not everything that counts can be counted

  3. #3
    Member
    Join Date
    Mar 2006
    Location
    Brno, Czech Republic
    Posts
    510

    Default

    lol i wrote in advance)
    Not everything that is counted counts and not everything that counts can be counted

  4. #4
    Super Moderator This forum account has been confirmed by cPanel staff to represent a vendor. chirpy's Avatar
    Join Date
    Jun 2002
    Location
    Go on, have a guess
    Posts
    13,495

    Default

    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.
    Jonathan Michaelson

    Need your cPanel servers secured and tuned?
    cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
    Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
    http://www.configserver.com

  5. #5
    Member
    Join Date
    Mar 2006
    Location
    Brno, Czech Republic
    Posts
    510

    Default

    bumping the thread.
    Not everything that is counted counts and not everything that counts can be counted

  6. #6
    cPanel Development cpanelkenneth's Avatar
    Join Date
    Apr 2006
    Posts
    3,788
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Does command line mysql still work?

    Try logging into MySQL as different users. Log in as the mod sec user.

  7. #7
    Member Solokron's Avatar
    Join Date
    Aug 2003
    Posts
    783

    Post

    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
    .

Similar Threads & Tags
Similar threads

  1. modsecparse.pl and modsec database
    By chips12 in forum Security
    Replies: 0
    Last Post: 11-24-2010, 05:20 AM
  2. modsecparse.pl issue
    By Serverji in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 02-11-2010, 08:02 PM
  3. modsecparse.pl fails after upgrading to mysql 5
    By mostaman in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 04-09-2008, 12:42 AM
  4. MySQL 4.1.18 Issues
    By gal3ler in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 05-04-2006, 10:51 AM
  5. Error in Modsecparse.pl
    By silversurfer in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 06-28-2005, 05:15 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube