I have encountered the following error when attempting to login to phpmyadmin via cPanel or WHM:
#2002 Cannot log in to the MySQL server
The mysql rool password and mysql logins however were working properly. mysqladmin proc was giving information and mysql.sock was present.
The issue was corrected by editing the following line the phpmyadmin configuration file at:
/usr/local/cpanel/base/3rdparty/phpMyAdmin/config.ing.php
$cfg['Servers'][$i]['host'] = 'localhost';
to:
$cfg['Servers'][$i]['host'] = '127.0.0.1';
Thank you,