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


Make sure that Plesk 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/ (Note, since Plesk 8.1 the file is $PRODUCT_ROOT_D/admin/htdocs/domains/databases/phpMyAdmin/libraries/config.default.php), for example:

# cd /usr/local/psa/admin
# grep controluser htdocs/domains/databases/phpMyAdmin/
$cfg[‘Servers’][$i][‘controluser’] = ‘USER’;

# grep controlpass htdocs/domains/databases/phpMyAdmin/
$cfg[‘Servers’][$i][‘controlpass’] = ‘PASSWORD’;

# grep pmadb htdocs/domains/databases/phpMyAdmin/
$cfg[‘Servers’][$i][‘pmadb’] = ‘DATABASE’;

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 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’,”,”,”,”,0,0,0);
mysql> INSERT INTO `db` VALUES (‘localhost’,’DATABASE’,’USER’,’Y’,’Y’,’Y’,’Y’,’N’,’N’,’N’,’N’,’N’,’N’,’N’,’N’);
mysql> flush privileges;

Replace USER, PASSWORD and DATABASE with the right values from

Leave a comment