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



Issue : -

While accessing PhpMyAdmin getting the following error.


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

OR

2. Restart MySQL service from WHM

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

OR

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';
~~~~~~~~~~~~~~~~


About these ads

18 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

    Thanx

    Email : FARAZ_FRANK777@YAHOO.COM

  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.
    Regards,
    Shivaraj

  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”
    instead
    /sites/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!

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s