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

mysql

Having problem like this with socket xampp-phpmyadmin on Windows?

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

To fix the #2002 problem, open your config.inc.php with path: \xampp\phpMyAdmin at your XAMPP directory and add the following code:

$cfg['Servers'][$i]['socket'] = '/var/run/mysql/mysql.sock';
or
$cfg['Servers'][$i]['connect_type'] = 'tcp';


56 comments on “#2002 – The server is not responding (or the local MySQL server’s socket is not correctly configured)

  1. Welcome to phpMyAdmin:
    MySQL said: Documentation
    #2002 – The server is not responding (or the local MySQL server’s socket is not correctly configured)

  2. This did not work. I have tried every suggestion that is out there and I can not figure this out. I am running Win7 pro Everything is fresh, I just installed new OS. any help will be greatly appreciated.

    Version 2.2 of WAMP
    Apache Version :2.2.21
    PHP Version :5.3.10
    MySQL Version :5.5.20

  3. I’m using latest XAMPP v2.5 Lite Version at XP sp3

    I can’t found those line and I just add both line on config.inc.php (using notepad++). Now everything works fine. Thank you, you are really my savior. Has been on this problem for a week.

  4. Well, ive searched en tryed all the internet for a solution here, but the first line i added to the file ($cfg[‘Servers’][$i][‘socket’] = ‘/var/run/mysql/mysql.sock';) resolved my problem.

    Thank you very much! Windows 7 x64

  5. If Not In My work, My SERVICE IS NOT WAMPSQLD Running, Somebody can tell me How to make it work? Detail, MY wamp Only FICA yellow, I think it’s because of this! :(

  6. When I try to start the service wampmysqld it gives the following error: windows could not start the service on Local Computer wampmysqld.

    Error 1067: The process terminated unexpectedly.

  7. Have tried all the above suggestions but still am getting error.

    MySQL said: Documentation
    #2002 – The server is not responding (or the local MySQL server’s socket is not correctly configured)

    below is config.inc.php file
    <?php

    /* Servers configuration */
    $i = 0;

    /* Server: localhost [1] */
    $i++;
    $cfg['Servers'][$i]['verbose'] = '127.0.01';
    $cfg['Servers'][$i]['host'] = '127.0.0.1';
    $cfg['Servers'][$i]['port'] = '';
    $cfg['Servers'][$i]['socket'] = '';
    $cfg['Servers'][$i]['connect_type'] = 'tcp';
    $cfg['Servers'][$i]['extension'] = 'mysqli';
    $cfg['Servers'][$i]['auth_type'] = 'config';
    $cfg['Servers'][$i]['user'] = 'root';
    $cfg['Servers'][$i]['password'] = '';
    $cfg['Servers'][$i]['AllowNoPassword'] = true;
    $cfg['Servers'][$i]['socket'] = '/var/run/mysql/mysql.sock';
    /* End of servers configuration */

    $cfg['DefaultLang'] = 'en-utf-8';
    $cfg['ServerDefault'] = 1;
    $cfg['UploadDir'] = '';
    $cfg['SaveDir'] = '';
    /* rajk – for blobstreaming */
    $cfg['Servers'][$i]['bs_garbage_threshold'] = 50;
    $cfg['Servers'][$i]['bs_repository_threshold'] = '32M';
    $cfg['Servers'][$i]['bs_temp_blob_timeout'] = 600;
    $cfg['Servers'][$i]['bs_temp_log_threshold'] = '32M';
    ?

    Kindly assist

  8. Hi!

    For me it did,’t work!
    I’m using xampp v1.8.1-0 on Win7.
    I tried that 2 lines and still the same…

    I even tried to change the socket in the my.ini to this one, I tried to set the socket in the php file as it first was in my.ini (and rollback the my.ini’s socket as well…), I’ve really tried everything!
    I must continue my work, because it’s only 2 weeks left till my final exam on the university…

    Please, help!

    thx m8!

      1. I tried… I tried to stop and restart it, I also tried to uninstall it and after I retyped the lines, I started and install it on the panel again…
        I tried everything I’ve found as solution on the internet, also in every combination and still the same… Now I try to install a Linux and continue my work on it, but it will slow my work, because I need to documentate it in MS Word…

  9. hi, i tried but didn’t worked for me.
    it still showing the 2002 error and message below it saying
    “Connection for controluser as defined in your configuration failed”

    can anyone help

  10. am using wamp server 2.1 on a win 8 machine
    have all means but still anyone should help me my project time is almost due

  11. If use opensuse problem because there are two mysql service running, Go to Yast2-Services Manager-mysql click Enable/Disable click Ok
    Terminal opt/lampp/lampp restart

Create Comment

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>