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.sock error, help!

Discussion in 'General Discussion' started by n000b, Jun 10, 2005.

  1. n000b

    n000b Well-Known Member

    Joined:
    Apr 7, 2005
    Messages:
    142
    Likes Received:
    0
    Trophy Points:
    16
    Hey guys,

    I was trying to update from MySQL 4.0 to 4.1. I went to Tweak Settings > Software in WHM, selected 4.1 and hit Save. I then went to Update Server Software.

    This is what came up:

    From what I can see from that, MySQL failed to install. I then ran /scripts/easyapache (as WHM tells me to) and recompiled Apache. I think this worked as PHP still works on my websites, just not mySQL.

    All my websites give me this error:

    Now, I tried to go back to MySQL 4.0 (used the same method at top of post but selected 4.0 instead of 4.1), but I still get those errors (I restarted mySQL after doing the above but still the same message).

    The file /tmp/mysql.sock exists but is empty.

    Anyone know what to do to fix it??
     
    #1 n000b, Jun 10, 2005
    Last edited: Jun 10, 2005
  2. n000b

    n000b Well-Known Member

    Joined:
    Apr 7, 2005
    Messages:
    142
    Likes Received:
    0
    Trophy Points:
    16
    Also, when I try to access mysql through SSH it gives me this error:

    ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (61)
     
  3. deadserious

    deadserious Member

    Joined:
    Apr 15, 2003
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    What is the output of:

    ls -l /tmp/mysql.sock

    ls -l /var/lib/mysql/mysql.sock

    ?
     
  4. n000b

    n000b Well-Known Member

    Joined:
    Apr 7, 2005
    Messages:
    142
    Likes Received:
    0
    Trophy Points:
    16
    srwxrwxrwx 1 mysql wheel 0 Jun 10 16:18 /tmp/mysql.sock


    lrwxr-xr-x 1 root mysql 23 Jun 10 16:20 /var/lib/mysql/mysql.sock -> ../../../tmp/mysql.sock
     
  5. deadserious

    deadserious Member

    Joined:
    Apr 15, 2003
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    What are the permissions currently set at on your /tmp directory?

    ls -l / | grep tmp
     
  6. n000b

    n000b Well-Known Member

    Joined:
    Apr 7, 2005
    Messages:
    142
    Likes Received:
    0
    Trophy Points:
    16
    drwxrwxrwx 5 root wheel 7168 Jun 10 17:24 tmp
     
  7. amal

    amal Well-Known Member

    Joined:
    Nov 22, 2003
    Messages:
    155
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Hi,

    Try replacing all the

    socket = /tmp/mysql.sock

    entries in /etc/my.cnf with

    socket = /var/lib/mysql/mysql.sock

    and restart mysql.

    If you still have a problem, try checking the mysql error logs ( usually a $hostname.err file at /var/lib/mysql after trying to start mysql

    Paste the last few lines of the error that you are getting.. :)
     
  8. WhiteBear

    WhiteBear Well-Known Member

    Joined:
    Feb 19, 2004
    Messages:
    53
    Likes Received:
    0
    Trophy Points:
    6
    My server continues without functioning th eMySQL.

    /usr/bin/mysqladmin: connect to server at 'localhost' failed error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)' Check that mysqld is running and that the socket: '/var/lib/mysql/mysql.sock' exists! mysql has failed, please contact the sysadmin (result was "mysql has failed").

    Some idea to decide this problem, please.
     
  9. AndyReed

    AndyReed Well-Known Member
    PartnerNOC

    Joined:
    May 29, 2004
    Messages:
    2,222
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Minneapolis, MN
Loading...

Share This Page