Tuesday, March 20, 2012

#2002 - The server is not responding (or the local MySQL server's socket is not correctly configured)

Error

#2002 - The server is not responding (or the local MySQL server's socket is not correctly configured)

while configuring phpMyAdmin

Solution

changed

$cfg['Servers'][$i]['host'] = 'localhost';

to

$cfg['Servers'][$i]['host'] = '127.0.0.1';

in config.inc.php

NOTE: you may need to change php.ini also if your web application database connections are broken too

check this article : http://techtrouts.com/mac-mysql-does-not-connect-on-localhost-but-connects-on-127001/


11 comments:

  1. C:\xampp\phpMyAdmin

    and the file name in the latest version is config.sample.inc.php

    change localhost to ip address
    it works!!!!


    thanks so much

    ReplyDelete
  2. Last 2/3 days I tried but not find any solution.

    Your very simple solution very very good.

    Lots of thanks

    Jaheed

    ReplyDelete
  3. try this one: add this line to config file $cfg['Servers'][$i]['connect_type'] = 'tcp'; but not lucky.
    Your method worked for me

    ReplyDelete
  4. hatur nuhun gan. . works euy . . :D hehe

    ReplyDelete
  5. I had this problem too but after sometime $cfg['Servers'][$i]['host'] = '127.0.0.1'; was missing, so I just added it with 127.0.0.1 no localhost, and it worked. Thank You!

    ReplyDelete
  6. Sorry Your method not work.
    for my issue is "
    MySQL said: Documentation
    #2002 - Connection refused
    The server is not responding (or the local server's socket is not correctly configured).

    Error

    MySQL said: Documentation
    #2002 - Connection refused
    The server is not responding (or the local server's socket is not correctly configured).
    Connection for controluser as defined in your configuration failed.

    ReplyDelete
    Replies
    1. same here ramnarayan if u get the answer then plz send me.. i want it urgently plz..

      Delete
  7. thanksss a lotttt its works perefct

    ReplyDelete
  8. http://sakafi.wordpress.com/2009/03/14/2002-the-server-is-not-responding-or-local-mysql-servers-socket-is-not-correctly-configured/#comment-2777

    ReplyDelete
  9. amaaaizing work perfectly

    ReplyDelete