Plesk upgrade fails with the error "Access denied for user 'admin'@'localhost'"/'horde'@'localhost'/'pp_sb_db'@'localhost'

Refers to:

  • Plesk 12.5 for Linux
  • Plesk 10.4 for Linux
  • Plesk Onyx for Linux
  • Plesk 11.0 for Linux
  • Plesk 11.5 for Linux
  • Plesk 12.0 for Linux
  • Plesk 9.x and below for Linux

Created:

2016-11-16 12:59:41 UTC

Modified:

2016-12-21 19:42:54 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Plesk upgrade fails with the error "Access denied for user 'admin'@'localhost'"/'horde'@'localhost'/'pp_sb_db'@'localhost'

Symptoms

An Plesk upgrade or installation fails with this error in the upgrade log:

Access denied for user 'admin'@'localhost' (using password: YES)

OR

Access denied for user 'horde'@'localhost' (using password: YES)

OR

Access denied for user 'pp_sb_db'@'localhost' (using password: yes)

Cause

Invalid MySQL credentials. Additional MySQL config files are included.

There is a /root/.my.cnf file on the server, and it contains invalid credentials and prevents the creation of a MySQL dump on the server.

MySQL programs read startup options (including credentials, if defined) from the following files, in the below order:

/etc/my.cnf
/etc/mysql/my.cnf
SYSCONFDIR/my.cnf
$MYSQL_HOME/my.cnf
defaults-extra-file (The file specified with --defaults-extra-file=path, if any)
~/.my.cnf

So, make sure that password and user are not specified in configuration files above.

Beginning with MySQL 5.0.4, it is possible to use !include directives in option files to include other option files and !includedir to search specific directories for option files. For example, to include the /home/mydir/myopt.cnf file, you could use the following directive:

!include /home/mydir/myopt.cnf

Resolution

Make sure there is no additional MySQL config file like ' /root/.my.cnf ' file with a MySQL password. Plesk uses the environment variable to pass the password to the MySQL server, but the ' .my.cnf ' file has a greater priority and MySQL uses the password from this file. If it does not match, the restoration fails. You should also check the !include directive.

In addition, check you are able to connect to MySQL from the command line using:

~# MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -u admin psa
Have more questions? Submit a request
Please sign in to leave a comment.