Plesk DBWebadmin(PHPMyAdmin) Error

Plesk – DBWebAdmin Error:
Get the following error when try to use PHPMyAdmin in the Parallels Panel: “#1045 – Access denied for user ‘pma_xxxxxxx’@’localhost’ (using password: YES)”

APPLIES TO:
* Plesk 8.x for Linux/Unix

Cause
The problem is caused by mismatch between user login credentials stored in phpMyAdmin configuration and database.
Using instructions below you may repair the configuration.

Resolution
Make sure that Parallels Panel PHPMyAdmin user exists in mysql.user table and has right password and privileges. Username and password can be found in $PRODUCT_ROOT_D/admin/htdocs/domains/databases/phpMyAdmin/libraries/config.default.php (In Parallels Plesk 8.1, 8.2, 8.3, 8.4 the file is $PRODUCT_ROOT_D/admin/htdocs/domains/databases/phpMyAdmin/libraries/config.default.php)

For example:
# grep controluser /opt/psa/admin/htdocs/domains/databases/phpMyAdmin/libraries/config.default.php
$cfg[‘Servers’][$i][‘controluser’] = $GLOBALS[‘db_host’] != ‘localhost’ ? ” : ‘USER’;
#
# grep controlpass /opt/psa/admin/htdocs/domains/databases/phpMyAdmin/libraries/config.default.php
$cfg[‘Servers’][$i][‘controlpass’] = ‘PASSWORD’;
#
# grep pmadb /opt/psa/admin/htdocs/domains/databases/phpMyAdmin/libraries/config.default.php
$cfg[‘Servers’][$i][‘pmadb’] = $GLOBALS[‘db_host’] != ‘localhost’ ? ” : ‘DATABASE’; // Database used for Relation,
#

Try to login as this user into MySQL from the command line. If the password doesn’t match, update mysql.user table and set ‘PASSWORD’ password for ‘USER’. If such user doesn’t exist in Mysql, create it with commands like:

# mysql -uadmin -p`cat /etc/psa/.psa.shadow`
mysql> use mysql;
mysql> INSERT INTO `db` VALUES (‘localhost’,’DATABASE’,’USER’,’Y’,’Y’,’Y’,’Y’,’N’,’N’,’N’,’N’,’N’,’N’,’N’,’N’,’N’,’N’,’N’,’N’,’N’);
mysql> INSERT INTO `user` VALUES (‘localhost’,’USER’,password(‘PASSWORD’),’N’,’N’,’N’,’N’,’N’,’N’,’N’,’N’,’N’,’N’,’N’,’N’,’N’,’N’,’N’,’N’,’N’,’N’,’N’,’N’,’N’,’N’,’N’,’N’,’N’,’N’,”,”,”,”,0,0,0,0);
mysql> flush privileges;

Replace USER, PASSWORD and DATABASE with the right values from “/usr/local/psa/admin/htdocs/domains/databases/phpMyAdmin/libraries/config.default.php”.

If you need further assistance, please do not hesitate to contact us.

Written by actsupp-r0cks