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 screwed, helllp!

Discussion in 'General Discussion' started by mgsnnetworks, Dec 22, 2005.

  1. mgsnnetworks

    mgsnnetworks Well-Known Member

    Joined:
    Sep 11, 2005
    Messages:
    48
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Rhyl, North Wales, UK
    I get this error in fanticico and all my members get the same message, what is going on?

    Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13) in /tmp/cpanel_phpengine.1135296174.78955949.84792479412 on line 1113
     
  2. WebScHoLaR

    WebScHoLaR Well-Known Member

    Joined:
    Dec 14, 2005
    Messages:
    511
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Planet Earth

    Check that mysql.sock exists at /var/lib/mysql/ path.If not on the shell write whereis mysql.sock.You may find it at /usr/local/lib/mysql.sock or /tmp/mysql.sock. If you find mysql.sock at any other location, create a symbloc link for /var/lib/mysql/mysql.sock and it will work.

    The error message that you got seems to be due to the incorrect permissions on /tmp directory.Make sure that the /tmp directory permissions are 1777 if not the chmod /tmp to 1777.
     
    #2 WebScHoLaR, Dec 22, 2005
    Last edited: Dec 22, 2005
  3. aby

    aby Well-Known Member

    Joined:
    May 31, 2005
    Messages:
    638
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    India
    If the mysql is working, then I think the mysql.sock file should be in /var/lib/mysql.sock and symlinks to that should be there at /tmp and /usr/local/lib/ and not the other way around.
     
  4. madaboutlinux

    madaboutlinux Well-Known Member

    Joined:
    Jan 24, 2005
    Messages:
    1,052
    Likes Received:
    2
    Trophy Points:
    38
    Location:
    Earth
    Change the permission of /tmp to 1777 and then install Mysql forcefully. Execute the below commands :-
    chmod 1777 /tmp
    /scripts/mysqlup --force

    This should fix the issue.
     
  5. talhabinrizwan

    talhabinrizwan Registered

    Joined:
    Nov 13, 2005
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Hi,
    Try to restart MySQL from WHM, if mysql.sock dosen't exist then it will be created. If the problem dosen't resolve then create a link to mysql.sock (if exists on your system). Otherwise try "/scripts/mysqlup --force" and change the permissions of /tmp directory as stated above.

    Regards,
    Talha
     
Loading...

Share This Page