Server Administration & Management

PhpMyAdmin Socket Error

If you are webmaster who using the web interface database management, you shall be familiar with PhpMyAdmin. Then you might get these error from your PhpMyAdmin when you logged into the PhpMyAdmin.

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

To overcome this error, you could have 2 ways to solve the problem.

Method 1:

1. Check if your mysql.sock file missing from /tmp.

2. If it is really missing from /tmp, you may create a symbolic link from /var/lib/mysql/ to /tmp.

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

3. You might ask why must do this, you may check the file from /usr/local/cpanel/base/3rdparty/phpMyAdmin/config.inc.php and you need to check for the setting of cfg[‘Server’][‘socket’],  and you will see the setting set to /tmp/mysql.sock.

Method 2:

1. Edit the following file.

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

2. Find $cfg[‘Servers’][$i][‘host’], change the value from localhost to


May 20, 2011 Posted by | cPanel, PHP | , , , | 3 Comments