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 failed: dbi error

Discussion in 'General Discussion' started by Secret Agent, Oct 30, 2004.

  1. Secret Agent

    Secret Agent Guest

    DBI connect('mysql:localhost','root',...) failed: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) at /scripts/restartsrv_mysql line 56 mysql has failed, please contact the sysadmin (result was "mysql has failed").

    I tried restarting MySQl and got that error above.

    updated apached as well, still the same.

    How to fix this?

    Thanks in advance.
     
  2. Seatech

    Seatech Registered

    Joined:
    Jun 10, 2003
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    I am very intersted in this answer too.

    Same problem.
     
  3. s_2_s

    s_2_s Well-Known Member

    Joined:
    Aug 9, 2004
    Messages:
    215
    Likes Received:
    0
    Trophy Points:
    16
    force an update of cpanel /scripts/upcp -force
     
  4. Seatech

    Seatech Registered

    Joined:
    Jun 10, 2003
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Tried that, no joy

    I found these in another forum... do they make any sense to anyone

    ./mysql_fix_privilege_tables -s '/var/lib/mysql/mysql.sock=' mysql.sock

    ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock
     
  5. jkims

    jkims Registered

    Joined:
    Jan 8, 2004
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    There seems to be a lot of people with this problem lately. Me being one of them.

    I have forced an update and everything but no joy. I even created a "mysql.sock" file to get it to connect to but the file disapears everytime I try to restart mysgl. Same with the symlinks. Very strange.

    If anyone gets the fix, let us know what it is and I will do the same if I get it first.
     
  6. chae

    chae Well-Known Member

    Joined:
    Apr 19, 2003
    Messages:
    145
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Auckland, New Zealand
    Got that one this morning when I restarted mysql from WHM, first time I have had that error. Did another restart of the service and that seem to do the trick.
     
  7. netendea

    netendea Member

    Joined:
    Jan 18, 2002
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    Had this problem on my server and it seems that the value of my password was the problem -- had a special character in it that perl didn't like.

    I've reported the problem to CPanel and will await a fix until then -- I'd recommend hardcoding the $dbpassword value in the script to get around the problem and then consider changing your password until they've got a fix installed....

    Regards,
    David
     
  8. Seatech

    Seatech Registered

    Joined:
    Jun 10, 2003
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    This was posted from our server tech support:

    After struggling for an hour or two trying to find out why both mysql and named (dns server) won't start, we finally got them to start. Looks like somebody was replacing the init script for both named and mysql. These init scripts are located in /etc/init.d directory, we renamed the bad files to mysqld.bak and named.bak.

    FWIW
     
  9. TDD

    TDD Active Member

    Joined:
    Dec 21, 2002
    Messages:
    38
    Likes Received:
    0
    Trophy Points:
    6
    The issue was that /tmp was chmod to 755, so MySQL couldn't create it's temporary
    files. I chmod it to 777 and MySQL could start without error.
     
  10. E-dentify

    E-dentify Member

    Joined:
    Sep 28, 2004
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Got the same problem, hoping it will be solved very soon. Need to transfer accounts from server to server, but cant grab the mysql databases with this error :(
     
  11. smile

    smile Well-Known Member

    Joined:
    Oct 2, 2004
    Messages:
    68
    Likes Received:
    0
    Trophy Points:
    0
    Did any of you managed to get this problem resolved ??? If yes can you please post the resolution here.
     
Loading...

Share This Page