“Error establishing a database connection” when installing Wordpress on OS X

This drove me nuts for a few days. I’ve been trying to set up a test environment on my desktop so that I can work through website iterations without fouling up this site. I walked through all the tutorials out there, but just could not get my Wordpress install to work.

WordPress › Error.png

Username, password, hostname were double and triple checked.

It turns out, that when I was installing MySQL on my computer (following the official instructions, which are just fine), I set up a UNIX socket. When I was setting up phpMyAdmin it explicitly asked for the socket… but Wordpress doesn’t, so it had never occurred to me to enter it.

You should enter it.

wp-config.php - Focus Group Camera Club.png

It’s for my local camera club, btw. Look for a new page some time into the new year.

Focus Group Camera Club.png