Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Can't get mysql to work - Getting mysql.sock error (but a unique one)

Discussion in 'General Discussion' started by noimad1, Oct 21, 2006.

  1. noimad1

    noimad1 Well-Known Member

    Joined:
    Mar 27, 2003
    Messages:
    627
    Likes Received:
    0
    Trophy Points:
    166
    I've searched the forums here and google and have tried a hundred things and can not get my mysql to work. It says it is running, but gives me this error on all pages that attempt to use mysql:

    Warning: mysql_connect() [function.mysql-connect]: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13) in

    Now, here is what I've done. To start, I was trying to restore all of the databases on a hacked server. I moved all of the /var/lib/mysql files to a mysql_back folder. I then re-installed mysql (i had to do this to get rid of a mysq.sock(11) error. I then copied back the files and reset the mysql password. Finally I was able to get mysql to start. However, I then started t get the (13) ERROR.


    I've tried removing the mysql.sock file and the /tmp/mysq.sock file and re-creating them both, restarting mysql. No luck

    I've tried to check all of the permissions on all of the files. As far as I can see they are all set correctly - including the tmp directory and mysql directories.

    None of my drives are full.

    I did this after a suggustion online:

    /usr/sbin/setenforce 0

    Restarted mysql. Still no luck.

    I've tried a upcp --force with no luck.

    If reloaded mysql about 10 times with no luck.

    I really need to get htis server up and running. At this point I would be willing to pay somone to fix it because I don't know what else to try.

    Let me know if you have any more suggestions, or if someone can help.

    Thanks,
    Damion
     
  2. noimad1

    noimad1 Well-Known Member

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

    OMG I believe I may have found it. It looks like the /var/lib/mysql folder needed 711 permissions, but had different. I think that might have worked....
     
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice