phpMyAdmin, ‘Error #2002 - The server is not responding’, and OS X 10.4.4

Posted on February 23, 2006
Filed Under /dev/null/ | 1,856 views |

Trying to install phpMyAdmin on a fresh OS X 10.4.4 install this afternoon was an incredible exercise in frustration. No matter what I did I kept getting the dreaded ‘Error 2002 - The server is not responding‘ error. Turns out the the location of mysql.sock has changed in this version of OS X; if you had all this working before upgrading then the OS was smart enough to detect it and create a sym link to the new location. However new installs, not so much.

This solution did the trick for me:

“Open a terminal, type in “ls -al /etc/php.ini*”
If a php.ini does not exist copy over the default php.ini, “sudo cp /etc/php.ini.default /etc/php.ini”
Now edit the php.ini, “sudo nano /etc/php.ini” (or use your prefered editor)
Find “mysql.default_socket” (you can search using [Ctrl]+[w] in nano)
Enter “/tmp/mysql.sock” after the equals sign.
Don’t forget to save the file ([Ctrl]+[o] [Enter] in nano)
Now restart Apache, “sudo apachectl graceful”

My god that’s frustrating to discover. Thank you mahongue, whomever you may be.

Comments

16 Responses to “phpMyAdmin, ‘Error #2002 - The server is not responding’, and OS X 10.4.4”

  1. john on March 1st, 2007 4:29 pm

    An increadibly hard error to find…
    Why is it so hard to get mac os x set up for apache, php and mysql?? These come pretty much set up by default in linux…

  2. MrHappy on March 1st, 2007 5:06 pm

    Agreed, this really should be default on OS X, given that it ships with both Apache and PHP. I’m hoping the next rev. will improve this but until then magic and voodoo will have to suffice.

  3. Benjamin Stein on June 18th, 2007 2:50 pm

    Thank you for posting this tip! I appreciate you taking the time to post. Very helpful.

  4. Mario B on June 23rd, 2007 6:37 am

    That’s just super awesome man! Worked like a charm! Thank you for your efforts!

  5. Dan on August 7th, 2007 10:08 pm

    I am so glad you figured this out. Saved me loads of oncoming headaches.

  6. frank on September 4th, 2007 12:48 am

    i was about to give up on this until i found your website. such a small thing and yet so big. thank you so much for posting this!

  7. MrHappy on September 4th, 2007 12:52 am

    Excellent! Very glad it was able to help you too.

  8. Ed on October 10th, 2007 8:20 pm

    Man, this post just made my day. Now I’m up and running. Thanks!

  9. Tilman on October 27th, 2007 9:08 am

    I will happily line up and say: thanks, that solved my problem.

  10. John Keys on November 11th, 2007 2:13 pm

    Thanks for posting that tip - it works for Leopard too. I have tried so many other tips, but this the only one that helped in my case.

  11. john dimatos on November 20th, 2007 12:24 am

    holy hell. thank you.

  12. Chris on January 15th, 2008 4:47 pm

    Wow. Thanks for posting this. I would never have found it myself, but it worked perfectly.

  13. Marion on February 24th, 2008 6:16 pm

    I had phpMyAdmin working with the help of this tip. Last night there was a power outage, which shut down my computer. I can not get phpMyAdmin working again, and I’m getting this same error. MySQL is up because my code can connect to it. I have tried rebooting my machine, but no luck in fixing it. If you have ANY suggestions, I would greatly appreciate it.

  14. James on April 2nd, 2008 5:24 am

    Thank you so much for this. Massive props.

  15. Mickster on April 8th, 2008 6:08 pm

    Ah, knowledge of the right place to tap the hammer. Many, many thanks. This worked as advertised. At least on my iMac 10.4.11. Now to leopard!

    Again thanks

    mickster

  16. Netto-Kun on June 16th, 2008 3:30 pm

    Thanks this one, even works perfect in leopard after get the error, in Leopard 10.5.3, macbook.

Leave a Reply