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

Discussion in 'General Discussion' started by PHPEcono, Aug 10, 2011.

  1. PHPEcono

    PHPEcono Active Member

    Joined:
    Apr 3, 2006
    Messages:
    29
    Likes Received:
    0
    Trophy Points:
    0
    Cpanel PHP4 and 5 MySQL working only on PHP4

    Hi I am have been having weird problems with my MySQL server for the last 2 days ... My sys admin reinstalled MySQL. Most of the website has been putted back online by manually remaking the database but for some reason those that has PHP5 enabled are not working

    Can't connect to local MySQL server through socket 'mysql.sock' (2)
    Ex: http://precisionsftech.com/

    I tryed a lot of stuff and nothing i do work. Any help is welcome at this point. thx!.
    Maby theres something i need to add in the MySQL config for it to work on both PHP versions? PHP4 is by delfault PHP5 can be activated with the add handler in the .htaccess

    Also i canot recompile apache for some reason
    it seems to be related to YUM ... i tryed this cmd yum list
    and it ruturned

    /usr/bin/python: error while loading shared libraries: libpthread.so.0: cannot open shared object file: No such file or directory
     
    #1 PHPEcono, Aug 10, 2011
    Last edited: Aug 10, 2011
  2. PHPEcono

    PHPEcono Active Member

    Joined:
    Apr 3, 2006
    Messages:
    29
    Likes Received:
    0
    Trophy Points:
    0
    So nobody ?
     
  3. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
  4. PHPEcono

    PHPEcono Active Member

    Joined:
    Apr 3, 2006
    Messages:
    29
    Likes Received:
    0
    Trophy Points:
    0
    I solved the socket error by doing this

    In your php.ini you will find a line
    mysql.default_socket = /tmp/mysql.sock
    change it to
    mysql.default_socket = /var/lib/mysql/mysql.sock
    Then restart apache and it will work.

    Now i just need to get the Yum thing solved.

    allso, when i try to restart apache i get Warning: DocumentRoot [/dev/null] does not exist
    I think thats my fault ... i saw a virus riectory set up as a domain but it was sending spam. The domain was not in the WHM list so i delete the file manualy ...
     
  5. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    The Apache restart issue is not an issue because that is just a warning message, which doesn't impact Apache starting.
     
Loading...

Share This Page