
If you are getting Mysql connection error in cPanel / WHM server then you have to edit your Mysql configuration file to change host name to local host IP.
Error:
#2002 Cannot log in to the MySQL server
Some how mysql login details are working fine still connection to phpadmin failed. Please try editing following file:
/usr/local/cpanel/base/3rdparty/phpMyAdmin/config.inc.php
And change following code in it:
Code:
$cfg[‘Servers’][$i][‘host’] = ‘localhost’;
to:
$cfg[‘Servers’][$i][‘host’] = ‘127.0.0.1’;
Thanks