OS X Mavericks Broke MySQL Connection

Upgrading to Mavericks gave me the following bug on my locally-hosted website:

mysqli::mysqli(): (HY000/2002): No such file or directory   [followed by my actual directory info]

This occurred apparently because PHP was upgraded, which triggered an older PHP compatibility bug.

The quick fix for this was to change the “localhost” references in my DB connectors to “”. Apparently I could link PHP differently for the real fix, but this was good enough for me:

$mysqli=new mysqli(“localhost”,$username,$password,$database);


$mysqli=new mysqli(“”,$username,$password,$database);


Hopefully Google finds this for you and this helps others.

Category(s): Uncategorized

Leave a Reply

Your email address will not be published. Required fields are marked *