SolutionCottage.com
Posted  23 Aug 2009 - 10:19:54

Category: Web Hosting


Can't connect to local MySQL server through socket...

Issue:
When you make a really simple PHP script or something similar when trying to connect to a MySQL server you get the error message: "Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (2)". I'm running Mac OS X 10.5 here, but I've seen it happen on other systems as well.

Solution:
Bring up a terminal and perform the following commands.

cd /var
sudo mkdir mysql
cd mysql
sudo ln -s /private/tmp/mysql.sock mysql.sock








0 comments:








© SolutionCottage 2008-2011 7/25/2017 7:31:03 AM