Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Member
    Join Date
    Mar 2003
    Posts
    604

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

    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. #2
    Member
    Join Date
    Mar 2003
    Posts
    604

    Default

    Quote Originally Posted by noimad1
    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

    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....

Similar Threads & Tags
Similar threads

  1. Replies: 13
    Last Post: 06-15-2010, 04:31 PM
  2. Replies: 13
    Last Post: 06-15-2010, 04:31 PM
  3. Remote MySQL and /var/lib/mysql/mysql.sock
    By emechanic in forum cPanel and WHM Discussions
    Replies: 6
    Last Post: 12-02-2009, 01:08 PM
  4. MySQL fails - /tmp/mysql.sock error
    By mudduck in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 11-16-2007, 10:28 AM
  5. Replies: 0
    Last Post: 06-27-2004, 02:53 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube