Bob and the Knowledge Factory / DBMS / phpMyAdmin / MySQL Socket Error in phpMyAdmin
MySQL Socket Error in phpMyAdmin |
|||||
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. |
|||||