SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Addict MikesBarto2002's Avatar
    Join Date
    May 2006
    Location
    New York City
    Posts
    317
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Socket operation on non-socket (trying to connect via unix:///tmp/mysql.sock)

    I just upgraded to Mountain Lion, and now I am having trouble connecting to MySQL. This is the error message that I am getting

    Warning: mysqli::mysqli(): [2002] Socket operation on non-socket (trying to connect via unix:///tmp/mysql.sock) in /Users/barryhjames/Sites/stwilliamtheabbot/genesis/databaseconnect.php on line 2
    Warning: mysqli::mysqli(): (HY000/2002): Socket operation on non-socket in /Users/barryhjames/Sites/stwilliamtheabbot/genesis/databaseconnect.php on line 2

    Well, line 2 is just a call to my database (using PHP). When I checked to see if the mysql.sock file was in the /tmp/ folder, it is.

    Not sure what is happening here. Any advice?

    WARNING: I'm not a server guy, so if you have advice, I might need to be walked through it a bit. Sorry!
    James Web Development | New York, NY
    Design, Develop, Deliver

  2. #2
    Foozle Reducer ServerStorm's Avatar
    Join Date
    Feb 2005
    Location
    Burlington, Canada
    Posts
    2,699
    Mentioned
    89 Post(s)
    Tagged
    6 Thread(s)
    Hi,

    Try running
    Code:
    tail -200 /var/lib/mysql/server.domain.com.err
    replace the 'server.domain.com' with the hostname of your mysql host; you can find that by reviewing the .err file in the /var/lib/mysql/ files. The tail command will return 200 lines of your error log this can post back to us and may help us refine more specifics surrounding the problem you are experiencing. You run the tail command in the command line. If for any reason your .err logs are not stored in your /var/lib/mysql/ then locate your .err by doing a search for this extension and noting the location of this file.


    ictus==""


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •