Community Forums
Connect with us on LinkedIn
Community Notice
+ Reply to Thread
Results 1 to 6 of 6
  1. #1
    Member
    Join Date
    Nov 2003
    Posts
    26

    Default Can't connect to local MySQL server through socket '/tmp/mysql.sock'

    Hello, my mysql suddonly stopped working. It was compltely random.

    mySQL error: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
    mySQL error code:

    I get that error.

    I tried to copy it into tmp folder from /var/db/mysql/ but it says it exists... but it does not.

    cp1# cp -rf /var/db/mysql/mysql.sock ../../tmp/
    cp: symlink: /tmp/mysql.sock: File exists

    Please help.

    thx.

    If all else fail what would be the best way to copy the databases reinstall mysql and put the databases back?

  2. #2
    Member linux-image's Avatar
    Join Date
    Jun 2004
    Location
    India
    Posts
    1,185
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    cd /tmp

    rm -rf mysql.sock

    ln -s /var/lib/mysql/mysql.sock mysql.sock

    that will do.

  3. #3
    Member
    Join Date
    Nov 2003
    Posts
    26

    Default

    That doesn't work :\

    cp1# mysql
    ERROR 2002: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (62)

    Btw I am on freebsd 4.8 with mysql (4.0.10-gamma)

    Maybe I can just uninstall mysql and make cpanel reinstall it with a cpanel update? How would i uninstall cpanel without deleting/remove the current databases.

    thx.
    Last edited by gopederick; 07-02-2004 at 03:45 AM.

  4. #4
    Member linux-image's Avatar
    Join Date
    Jun 2004
    Location
    India
    Posts
    1,185
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    freebsd am not sure the..

    also you can try a restart for the mysql that will create the socket the natural way.

  5. #5
    Member
    Join Date
    Feb 2003
    Posts
    128

    Default

    i am having this problem also on my freebsd 4.10 box. was there ever a solution for this?

  6. #6
    Member
    Join Date
    Nov 2003
    Posts
    148

    Default

    Try this:

    /usr/local/bin/mysqld &
    ProficientHost
    http://www.proficienthost.com
    Delivering Quality Hosting & Design Services

Similar Threads & Tags
Similar threads

  1. Replies: 13
    Last Post: 06-15-2010, 05:31 PM
  2. Replies: 13
    Last Post: 06-15-2010, 05:31 PM
  3. Replies: 16
    Last Post: 06-11-2006, 12:03 PM
  4. Can't connect to local MySQL server through socket '/tmp/mysql.sock'
    By kerm1t in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 05-19-2005, 08:39 PM
  5. Replies: 0
    Last Post: 06-27-2004, 03:53 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube