Product:
Search Type:

Get the following error when try to use PHPMyAdmin in the Plesk CP: "#1045 - Access denied for user 'pma_xxxxxxx'@'localhost' (using password: YES)"

Article ID: 1252 
Last Review: Mar,10 2007
APPLIES TO:
  • Plesk 7.5.x Reloaded
  • Plesk 8.x for Linux/Unix

RESOLUTION

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/config.inc.php (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/config.inc.php
$cfg['Servers'][$i]['controluser'] = 'USER';

# grep controlpass htdocs/domains/databases/phpMyAdmin/config.inc.php
$cfg['Servers'][$i]['controlpass'] = 'PASSWORD';

# grep pmadb htdocs/domains/databases/phpMyAdmin/config.inc.php
$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 config.inc.php.

Please provide feedback on this article

Did this article help you solve your issue?
Yes
No
Partially
I do not know yet
 
Strongly Agree   Strongly Disagree
  9 8 7 6 5 4 3 2 1
The article is easy to understand
The article is accurate
Additional Comments:
*Please provide us with your email address in case we need to contact you.
*Please type the code you can see.
* - required fields