Showing posts with label mysql problem. Show all posts
Showing posts with label mysql problem. 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

XAMPP: Couldn't start MySQL

Remove Error : XAMPP: Couldn't start MySQL

Run following commands in terminal
$ sudo chown -hR root /opt/lampp $ sudo chmod -R 777 /opt/lampp $ sudo /opt/lampp/lampp restart
After running above commands when you try to start XAMPP and it gives following error :

"Warning: World-writable config file ‘/opt/lampp/etc/my.cnf’ is ignored"

To Remove above error, Run following command in terminal
$ sudo chmod 755 /opt/lampp/etc/my.cnf

After running above command when you try to start XAMPP again and it gives following error :

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

To Remove above error, Run following command in terminal
$ sudo chmod 755 /opt/lampp/phpmyadmin/config.inc.php