setting up WordPress on a mac, easy minus one lame small gotcha

by John Wilker in EffectiveUI, Mac, Technology

I’m installing Word press locally on my work laptop so I have a test bed for something bigger that I’m doing. I found an old OS X 10.4.x blog post guide, which was really helpful, until it got to connecting Word Press to mySQL.

Then I lost all sense of self, and slowly went insane, for an hour.

I’m no dummy, but man, setting up PHP and Word Press on my mac was PAINFUL.

Getting PHP up and running, check.

MySQL. been there done that, check.

word press install, no check. kept getting “error connecting to database”

Googling revealed many posts on this topic, in the Word Press forums, the MySQL forums, and Apple. All talking about where the mysql.socket is kept, and how it should be in one place, but isn’t and many ways of working around that.

No joy.

Finally I did another search for Word Press on 10.5.x, which yeilded even more threads on the database error topic.

Then 6 months ago, on this thread, jonokane posted this gem,

Followup: After spending what seems like an absolutely ridiculous amount of time on this, I have figured out the embarrassingly simple issue.

localhost != Localhost

My Mac identifies itself as Localhost, NOT localhost! Learned something extremely obvious…. :)

So the config should look like this:

It certainly shoulda been obvious! I know the Mac is *nix, and capitalization is key, but it was just too close, too obvious. It was also the default, so it never occured to me to think on it.

So, lesson learned, and now, next time I do this. This blog post will light my way!

2 Responses to “setting up WordPress on a mac, easy minus one lame small gotcha”

  1. Flo says:

    I always use MAMP. That’s much easier :)

  2. Flo says:

    I always use MAMP. That's much easier :)

%d bloggers like this: