Googling the Obscure Technical Answer

OR if at first you don’t succeed, search and search again?

What started as a simple task chewed up a good hour of time today… Eager to start dabbling in Drupal, I decided to get the needed parts running locally on my MacBookPro. I got MySQL 5.x downloaded and installed. I mucked up my root passwords (typo) and spent 12 minutes in vain for the right way to reset it…. upscrolling my terminal window revealed the goof in my earlier set up of the root password (yup some of the time sink is my own fault).

Next I got a copy of phpMyAdmin, to run locally to do basic database admin. It should be a pretty basic set up since it is behind my firewall, so my security can be, well, lax. Yikes. I keep getting all kinds of errors:

MySQL said:#2002 – The server is not responding (or the local MySQL server’s socket is not correctly configured)

which stumped me since I was connecting fine on the command line. And the socket file is where it is supposed to be.

So I googled the entire error message and got reams of hits, mostly people in forums asking for help. The first 5 guess attempts I followed were dead ends. Finally I got the right answer buried at Nick’s Tech Blog:

If you are running MySQL and phpMyAdmin on Mac OS X, and you just upgraded to OS X 10.4.4, you may have seen this error message when trying to access your MySQL server using phpMyAdmin: “The server is not responding (or the local MySQL server’s socket is not correctly configured)”. If this has happened to you, here is the fix:

1. load /private/etc/php.ini into your favorite editor. You may have to become root and change permissions on the file in order to edit it.

2. find the line that says ‘mysql.default_socket = ‘.

3. change that line to say ‘mysql.default_socket = “/tmp/mysql.sock”‘, and save php.ini.

4. as root, on the command line in a terminal window, restart the Apache webserver by typing ‘apachectl graceful’.

BINGO! Bling! That was it.

That is pretty obscure indeed. Thank you Google, thank you Nick.

If this kind of stuff has any value, please support me monthly on Patreon or a one time PayPal kibble toss
Profile Picture for Alan Levine aka CogDog
An early 90s builder of the web and blogging Alan Levine barks at CogDogBlog.com on web storytelling (#ds106 #4life), photography, bending WordPress, and serendipity in the infinite internet river. He thinks it's weird to write about himself in the third person.


  1. I usually just create a symbolic link from /usr/mysql/mysql.sock to /tmp/mysql.sock and it works fine without tinkering with the config files. It’s a silly thing that started being required a while back.

    For MySQL editing, definitely check out “CocoaMySQL” – it’s a native app that lets you modify the database and data, without mucking about in a web page or command-line mysql prompts. Also, there’s the new “MySQL Administrator” app provided by MySQL directly. It’s a separate download, but is sucking less than ever before.

    And, for Drupal, you need to run the “database.4.1.mysql” script, even though you have 5.x installed.

    Have fun with Drupal!

  2. oh, and the mysql.sock location mismatch would have killed any PHP app, including PHPMyAdmin, and of course Drupal. You’ve already solved it, so all PHP+MySQL stuff should run fine now…

  3. You should consider buying a Bluehost account (or equivalent) and using their GUI to manipulate some of this stuff–although I certainly understand the value and painful pleasure of doing it from scratch.

Comments are closed.