Contact Us
 
 
 
 
  Browse by category :
 

Bob and the Knowledge Factory / DBMS / phpMyAdmin / MySQL Socket Error in phpMyAdmin

MySQL Socket Error in phpMyAdmin

Add comment
Views: 2563
Votes: 1
Comments: 0
Posted: 27 Jun, 2008
by: Thilaga R.
Updated: 12 Mar, 2009
by: Harish R.

While accessing phpMyAdmin, you may get the following error.

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

This is due to the missing socket file in the location /tmp.

The socket path which is specified in the phpMyAdmin configuration file is /tmp/mysql.sock.

$ vi /usr/local/cpanel/base/3rdparty/phpMyAdmin/config.inc.php
cfg['Server']['socket']         = '/tmp/mysql.sock';

If mysql.sock is missing in /tmp, then create a link to the mysql.sock file in /var/lib/mysql.

$ ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock

There is also another fix for this issue.

1. Open the phpMyadmin config file "config.inc.php".

vi /usr/local/cpanel/base/3rdparty/phpMyAdmin/config.inc.php

2.Locate the line:

$cfg['Servers'][$i]['host']          = 'localhost';

3.Replace 'localhost' with '127.0.0.1' and save.

$cfg['Servers'][$i]['host']          = '127.0.0.1';

This will also fix the issue.
Others in this Category
document Warning message in PhpMyAdmin after upgrading MySQL version to 5 In cPanel server.
document PhpMyAdmin error - "The local MySQL server's socket is not correctly configured"
document phpMyAdmin Error: Cannot start session without errors



RSS
Content is available under Creative Commons Attribution-Share Alike 3.0 License.