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

Issue : –

While accessing PhpMyAdmin getting the following error.

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

Reason :-

The  mysql socket file is missing from the /tmp directory

Fix :-

1. Create a symbolic link from the original mysql socket file to /tmp

[root@test ~]# ln -s /var/lib/mysql/mysql.sock /tmp


2. Restart MySQL service from WHM

WHM Login >> Main >> Restart Services >>SQL Server (MySQL)


3.  Edit the PhpMyAdmin configuration file to use the original MySQL socket file.

vi /usr/local/cpanel/base/3rdparty/phpMyAdmin/config.inc.php

Make sure, the correct mysql socket file is mentioned there.
$cfg[‘Servers’][$i][‘socket’] = ‘/var/lib/mysql/mysql.sock’;
$cfg[‘Servers’][$i][‘connect_type’] = ‘socket’;


22 responses to “#2002 – The server is not responding (or local MySQL server’s socket is not correctly configured).

  1. Super…helped it…good one

  2. Clear answers it worked! thanks

  3. hi i tried ,but i cannot see vi /usr/local/cpanel/base/3rdparty/phpMyAdmin/config.inc.php as you wrote ..please reply by email thank in advance i try to find this dir but i did not see this file and dir

  4. Good one! helped me one change in some flavors use /var/run/mysql/mysql.sock instead of /var/lib/mysql.sock

  5. I looking for method on windows server 2008.
    Please give for solve my server.
    This time error!

  6. Thanks Vinodh Kumar for the tip off, saved me a lot of frustration!

  7. it works…thanks

  8. Easy Way Is: (i hav applied on Wamp Server 2.1)
    1. left click on wamp server
    2. Select MySQL —>Service —->Install Service
    3. Then MySQL —>Service —->Restart Service
    4. Left click on PhpMyAdmin
    5. Here we go



  9. Step #1 worked for me

  10. hello,
    I also faced the same problem.
    But after restarting my “Server” and “phpmyadmin” i resolved the problem.
    now its working.

  11. Thanks for your help its working.

  12. Plz Help me.I have same problem.and evevif i do changes in config.inc i got same error.plz help me.
    I restart server so many time.But could not help.

  13. Thanks alot! Although on MAC small changes

    “vi /usr/local/cpanel/base/3rdparty/phpMyAdmin/config.inc.php”

    I manually entered:
    $cfg[‘Servers’][$i][‘socket’] = ‘/var/mysql/mysql.sock’;
    $cfg[‘Servers’][$i][‘connect_type’] = ‘socket’;

    Small changes, but needed for my computer!

  14. i apply all type of tools which arebasically help full to solve out my problem

  15. Pingback: How to solve MySQL 2002 - The server is not responding .....on Windows 7 - feed99

  16. Thanks!!! Sealed the deal!

  17. hi ,
    I have added the lines as suggested by you in the config.inc.php.But when I restart the xampp and try to access http://localhost/phpmyadmin…it says that there was a parsing error and the error is:

    “Starting to parse config file…
    Parse error: syntax error, unexpected T_VAR in /opt/lampp/phpmyadmin/config.inc.php on line 40”

    The line no 40 is where I have added the line

    $cfg[‘Servers’][$i][‘socket’] = ‘/var/lib/mysql/mysql.sock’;
    $cfg[‘Servers’][$i][‘connect_type’] = ‘socket’;

  18. I could resolve it 🙂

  19. superb ji.
    it is working now!!!

  20. Thanks It works for me …..

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s