Meta

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:

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

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

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:

Edit the following file./usr/local/cpanel/base/3rdparty/phpMyAdmin/config.inc.php

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