Showing posts with label mysql giving error in xampp. Show all posts
Showing posts with label mysql giving error in xampp. Show all posts

Saturday, April 13, 2013

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

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

Probably there are two mysql running. Open the terminal and run
$ service mysql stop
or
$ service mysqld stop
(according to your Linux distribution)
Now restart lampp and try to open phpMyAdmin.

Make sure you have following code in your /opt/lampp/phpmyadmin/config.inc.php
$cfg['Servers'][$i]['connect_type'] = 'tcp';
If not, add above line in config.inc.php and Restart mysql.

If you are still facing the problem. Add this line in your config.inc.php too.
$cfg['Servers'][$i]['socket'] = '/var/run/mysql/mysql.sock';
and Restart mysql.

If you are still facing the problem, Make following changes in your config.inc.php

change 
$cfg['Servers'][$i]['host'] = 'localhost';
to 
$cfg['Servers'][$i]['host'] = '127.0.0.1';
Now restart mysql and open phpmyadmin.

If you are still facing the problem, check permission of the file /opt/lampp/phpmyadmin/config.inc.php, it should not be less than 755.
Set it to 755.
Run following command.
$ sudo chmod 755 /opt/lampp/phpmyadmin/config.inc.php
Now restart LAMPP and try to open phpmyadmin again.
http://localhost/phpmyadmin