The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Mysql issues...

Discussion in 'General Discussion' started by camers, Nov 12, 2005.

  1. camers

    camers Member

    Joined:
    Oct 8, 2004
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    1
    Just got a new server going.. and running into some small troubles we cant seem to figure out.

    We're getting this in our /scripts/cpbackup output and when we reboot, when exim stats trys to come up:

    /usr/bin/mysqladmin: connect to server at 'localhost' failed
    error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)'
    Check that mysqld is running and that the socket: '/var/lib/mysql/mysql.sock' exists!

    And further into the cpbackup output things like... :

    Grabbing mysql dbs............
    DBI connect('mysql:localhost','root',...) failed: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) at /usr/local/cpanel/Cpanel/Mysql.pm line 40
    Can't call method "prepare" on an undefined value at /usr/local/cpanel/Cpanel/Mysql.pm line 724.
    DBI connect('mysql:localhost','root',...) failed: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) at /usr/local/cpanel/Cpanel/Mysql.pm line 40
    Can't call method "prepare" on an undefined value at /usr/local/cpanel/Cpanel/Mysql.pm line 502.
    Done
    Grabbing mysql privs...DBI connect('mysql:localhost','root',...) failed: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) at /usr/local/cpanel/Cpanel/Mysql.pm line 40
    Can't call method "prepare" on an undefined value at /usr/local/cpanel/Cpanel/Mysql.pm line 724.
    Done

    -------

    Any ideas? Driving me crazy right now. The only thing related to mysql I have touched would be changing the root password for it. And in /root/.my.cnf seems to be correct...

    Thanks, Please help.
     
    #1 camers, Nov 12, 2005
    Last edited: Nov 12, 2005
  2. netlook

    netlook Well-Known Member
    PartnerNOC

    Joined:
    Mar 25, 2004
    Messages:
    335
    Likes Received:
    0
    Trophy Points:
    16
    Try this:

    Code:
    /scripts/perlinstaller --force Bundle::DBD::mysql
     
  3. camers

    camers Member

    Joined:
    Oct 8, 2004
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    1
    Thanks. I have ran it, I'll wait and see the output of the backup later.

    It can't perform again right now, and I don't wish to reboot.

    Any more suggestions?
     
  4. RizyDeWino

    RizyDeWino Well-Known Member

    Joined:
    Aug 1, 2005
    Messages:
    74
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Planet Earth
    On the Shell write,

    whereis mysql.sock

    You will get some paths of mysql.sock like /usr/local/lib/mysql.sock and may b in /tmp too.Check that mysql.sock exists at /var/lib/mysql/.If not then found the mysql.sock on your system and create a symbolic link for it in /var/lib/mysql/.
     
Loading...

Share This Page