Friday 2 December 2011

PHPMyAdmin Error


While accessing phpmyadmin from WHM, it is showing the below error.

--------------------------
#2002 - The server is not responding (or the local MySQL server's socket is not correctly configured)
--------------------------
Reason is:
The mysql socket file is missing from the "/tmp" directory.

Solution:
1. Create a symbolic link from the original mysql socket file to /tmp
# ln -s /var/lib/mysql/mysql.sock /tmp
OR
2. Edit the PhpMyAdmin configuration file to use the original MySQL socket file.
vi /usr/local/cpanel/base/3rdparty/phpMyAdmin/config.inc.php
Make sure, the correct mysql socket file is mentioned there.
$cfg['Servers'][$i]['socket'] = '';
change to
$cfg['Servers'][$i]['socket'] = ‘/var/lib/mysql/mysql.sock’;
$cfg['Servers'][$i]['connect_type'] = 'tcp';
change to
$cfg['Servers'][$i]['connect_type'] = ‘socket’;

No comments: