tenpastmidnight blog
Making hay while the sun shines
» Wednesday, June 28, 2006 «
OSX MySQL and PHP - use 127.0.0.1 rather than localhost
Got MySQL back on my iBook (though a newer version than before, 4 is soooo much easier to install than 3.23 on OSX.) Cocoa MySQL could connect fine to 'localhost', so could ColdFusion, but PHP wouldn't, I kept getting an "can't connect to local mysql server" error. Eventually I tried using '127.0.0.1' rather than 'localhost' on the connection string, and it's started working, so if you're having the same problem, try that.