How to solve “Error MySQL said: Documentation #2002 – The server is not responding (or the local MySQL server’s socket is not correctly configured) Connection for controluser as defined in your configuration failed.” problem?

When we try to access PHPMyAdmin from xampp on linux we might get the following errors
Error
MySQL said: Documentation
#2002 – The server is not responding (or the local MySQL server’s socket is not correctly configured)
Connection for controluser as defined in your configuration failed.

OR
Wrong permissions on configuration file, should not be world writable!

This is caused due to control is set to 777 for the configuration files
1. /opt/lampp/etc/my.cnf
2. /opt/lampp/phpmyadmin/config.inc.php

So we need to change its permission by running following script in terminal
1. sudo chmod 705 /opt/lampp/phpmyadmin/config.inc.php
2. sudo chmod 705 /opt/lampp/etc/my.cnf

I have config.inc.php file in /opt/lampp/phpmyadmin, please set path according to your installation location. Same for my.cnf file.

It works fine!!.

If still you are having any problems. Please let me know.

About the Author

has written 38 stories on this site.

19 Comments on “How to solve “Error MySQL said: Documentation #2002 – The server is not responding (or the local MySQL server’s socket is not correctly configured) Connection for controluser as defined in your configuration failed.” problem?”

  • princess wrote on 31 January, 2012, 11:41

    It is not working…. I am still getting the error message

  • geetanjali wrote on 10 February, 2012, 11:10

    no,i am still getting the problem

  • admin wrote on 21 February, 2012, 3:45

    @geetanjali: Did u solved it now?

  • nirav ( india) wrote on 21 February, 2012, 4:53

    hi i m nirav from india a software developer.
    thanks its really working i know this error is about permission but which i didnt get i have used many but this 705 its realy working thanks a lot……tc

  • admin wrote on 21 February, 2012, 5:25

    @nirav: welcome brother…

  • shaan wrote on 15 April, 2012, 15:10

    getting same error in windows 7..its not working here

  • Ratnesh wrote on 5 May, 2012, 6:05

    it worked. Thank a lot

  • daljeet singh wrote on 31 May, 2012, 8:06

    thank you very much

  • varun wrote on 5 June, 2012, 6:41

    cool !! It works fine !! Thanks a lot !!!

  • kevin wrote on 30 June, 2012, 8:35

    you are sooo great…..

  • Anderson wrote on 5 July, 2012, 9:14

    Thanks so much, it worked for me

  • Gurminder Singh wrote on 31 July, 2012, 11:43

    After this i am still facing “Error

    MySQL said: Documentation
    #2002 – The server is not responding (or the local MySQL server’s socket is not correctly configured) ” Please provide me a possible solution for the same ASAP. I am using Fedora 14. This problem is very common & too much in my office. Still i didn’t get a permanent solution for this problem…

  • amol wrote on 21 August, 2012, 7:52

    How to solve “Error MySQL said: Documentation #2002 – The server is not responding (or the local MySQL server’s socket is not correctly configured) Connection for controluser as defined in your configuration failed.” problem?

    i have same problem in Xampp

  • ela wrote on 21 September, 2012, 12:53

    Error in Phpmyadmin

    You probably did not create a configuration file. You might want to use the setup script to create one.
    Error

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

  • Ravindra Khaire wrote on 2 November, 2012, 12:51

    I am facing similar problem of “#2002 Cannot log in to the MySQL server – Connection for controluser as defined in your configuration failed.” on a win 7 Machine with Wamp and Xamp both running on it. I tried all the solutions I found on net but it didn’t work.

    Can somebody help me to resolve this issue?

  • Yemi Kudaisi wrote on 15 January, 2013, 16:02

    On my ubuntu i simple backed up my htdocs folder and deleted the entire lampp folder after which i reinstalled xampp and the problem was solved.

  • Pea wrote on 2 February, 2013, 5:53

    That worked for me. Thanks!!!

  • buddha wrote on 8 March, 2013, 12:53

    Error MySQL said: Documentation #2002 – The server is not responding

Trackbacks

  1. pc.casey.jp » Ubuntu でXAMPP を使う

Write a Comment

Gravatars are small images that can show your personality. You can get your gravatar for free today!

*

Copyright © 2024 Programmer to Programmer- A website for web programming and mobile application programming tutorials.
Wordpress themes