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

Posted on February 23, 2006
Filed Under /dev/null/ | 13,524 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

21 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.

  17. Sam on August 6th, 2008 11:57 pm

    That’s awesome. I tried to get localhost up and running for quite a few days 3 months ago. This article solved it all. Eternal thanks to you!!

  18. Jimmy on August 13th, 2008 8:37 am

    Thanks for that tip worked fine and solved my problem with accessing phpMyAdmin in my iMac

  19. Steve Petersen on August 24th, 2008 4:41 pm

    Wow, I too must thank you and to your source - that was driving me nuts too.

  20. Jash Sayani on November 1st, 2008 12:35 pm

    Wow!! Thanks a lot. Same issue with Leopard.

    Getting Access denied now, but I will check the config file. My Connection error is SOLVED !!! :)

  21. nothank@nothanks.org on March 1st, 2009 9:09 pm

    first of all i found the actual mysql.sock at: /opt/local/var/run/mysql5/mysqld.sock

    look at the phpinfo, it probably says /var/mysql. if you can get into mysql with the command line and you can view the phpmyadmin login screen in a browser, then that just means php isn’t talking to mysql. i found some instruction that say to ’sudo mkdir /var/mysql’ and then ’sudo chown _mysql /var/mysql’ .. i don’t know what the underscore means but it needs that. then just do a ’sudo ln -s /opt/local/var/run/mysql5/mysqld.sock /var/mysql/mysql.sock’ … also i made /etc/my.cnf, not sure if it matters. also i have both php.ini.default and php.ini although i’m not sure if that matters

  • About

    This is an area on your website where you can add text. This will serve as an informative location on your website, where you can talk about your site.

  • Admin