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!

Hi,

Try running

[FONT=verdana, geneva, lucida, lucida grande, arial, helvetica, sans-serif][COLOR=#000000]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.

[/COLOR][/FONT]