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 missing

Discussion in 'General Discussion' started by hmalekib, Jun 11, 2006.

  1. hmalekib

    hmalekib Member

    Joined:
    Nov 8, 2004
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    1
    Hi guys... My mysql.sock is missing and im getting the following error:

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

    I tried /scripts/restartsrv_mysql but no luck..

    any suggestions?
     
  2. AndyReed

    AndyReed Well-Known Member
    PartnerNOC

    Joined:
    May 29, 2004
    Messages:
    2,222
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Minneapolis, MN
    Please search these forums. This issue has been discussed hundreds of times.
     
  3. BuffaloWeb

    BuffaloWeb Well-Known Member

    Joined:
    Jul 1, 2003
    Messages:
    83
    Likes Received:
    0
    Trophy Points:
    6
    A link would help... :rolleyes:
     
    #3 BuffaloWeb, Jul 26, 2006
    Last edited: Jul 27, 2006
  4. bijo

    bijo Well-Known Member

    Joined:
    Aug 21, 2004
    Messages:
    475
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    India
  5. kerriritter

    kerriritter Active Member

    Joined:
    Oct 25, 2004
    Messages:
    31
    Likes Received:
    0
    Trophy Points:
    6
    Try this

    Try this procedure to fix mysql.sock error:

    cd /var/lib/mysql
    touch mysql.sock
    chown mysql:mysql mysql.sock
    chmod 1777 mysql.sock

    now make a sym link into /tmp

    ln -s /var/lib/mysql/mysql.sock /tmp
    then
    chmod 1777 /tmp

    now
    /scripts/mysqlup --force


    now just restart mysql
    /etc/rc.d/init.d/mysql restart
     
  6. Modchips(Pablo)

    Joined:
    Jul 26, 2005
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Thanks so much

    done this will rebuild the mysql.sock file.

    Thanks again
    Pablo
     
  7. noimad1

    noimad1 Well-Known Member

    Joined:
    Mar 27, 2003
    Messages:
    627
    Likes Received:
    0
    Trophy Points:
    16

    What if I tried all this and it still doesnt work, any other ideas?
     
  8. AndyReed

    AndyReed Well-Known Member
    PartnerNOC

    Joined:
    May 29, 2004
    Messages:
    2,222
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Minneapolis, MN
    If none of these suggestions worked, you can seek professional help.
     
  9. noimad1

    noimad1 Well-Known Member

    Joined:
    Mar 27, 2003
    Messages:
    627
    Likes Received:
    0
    Trophy Points:
    16

    I took a break, then a nap, ate some food, took another nap, then came back to it and was able to get it fixed.
     
Loading...

Share This Page