Article ID: 1252, created on Oct 6, 2008, last review on Jun 3, 2016

  • Applies to:
  • Plesk 12.5 for Linux
  • Plesk 12.0 for Linux
  • Plesk 11.0 for Linux
  • Plesk 12.0 for Windows


The following error occurs when trying to use PHPMyAdmin in Plesk:

#1045 - Access denied for user 'pma_xxxxxxx'@'localhost' (using password: YES)


Cannot connect: invalid settings.
Connection for controluser as defined in your configuration failed.

Or it is not possible to login under user to PhpMyAdmin:

#1142 - SELECT command denied to user 'plesktest'@'localhost' for table 'pma_recent' 

It's not possible to edit database via PhpMyAdmin interface.


The issue is caused by a mismatch between user login credentials stored in the phpMyAdmin configuration and the database.


  1. Make sure that PHPMyAdmin user exists in the mysql.user table and has the right password and privileges. The username and password can be found in:

    • $PRODUCT_ROOT_D/admin/htdocs/domains/databases/phpMyAdmin/libraries/config.default.php in Plesk 8.1, 8.2, 8.3, 8.4

    • /usr/local/psa/admin/htdocs/domains/databases/phpMyAdmin/libraries/config.default.php in Plesk 12.5

    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.

  2. Update the mysql.user table and set PASSWORD as the password for USER.

    • If such user doesn't exist in Mysql, create it with commands like:

      # MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -u admin
      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;
    • In case the user exists update password with the correct value:

      mysql> SET PASSWORD for 'USER'@'localhost' = password('PASSWORD');
      mysql> flush privileges;

Also refer to the KB article to fix the issue with database users.

Search Words


Access denied for user

1045 - Access denied for user @localhost (using password: YES)

a914db3fdc7a53ddcfd1b2db8f5a1b9c 29d1e90fd304f01e6420fbe60f66f838 56797cefb1efc9130f7c48a7d1db0f0c 742559b1631652fadd74764ae8be475e e335d9adf7edffca6a8af8039031a4c7 ed7be2b984f9c27de1d2dc349dc19c6d 85a92ca67f2200d36506862eaa6ed6b8 a766cea0c28e23e978fa78ef81918ab8 2a5151f57629129e26ff206d171fbb5f aea4cd7bfd353ad7a1341a257ad4724a 0a53c5a9ca65a74d37ef5c5eaeb55d7f

Email subscription for changes to this article
Save as PDF