Applicable to:
- Plesk for Linux
Symptoms
-
Plesk upgrade or installation fails with one of the following errors in
/tmp/autoinstaller3.log
:CONFIG_TEXT: Access denied for user 'admin'@'localhost' (using password: YES)
CONFIG_TEXT: Access denied for user 'horde'@'localhost' (using password: YES)
CONFIG_TEXT: Access denied for user 'pp_sb_db'@'localhost' (using password: yes)
CONFIG_TEXT: EMERGENCY: The file /root/.my.cnf contains a password for the MySQL console client. Please remove this file temporarily and restore it after the upgrade, otherwise the upgrade will fail.
Note: this may also appear as a warning during the pre upgrade checker:
-
Migration fails with the following error:
CONFIG_TEXT: Error:
Failed to generate migration list file
Cause: Command execution failed on the local server with non-zero exit code.
command: MYSQL_PWD="$(cat /etc/psa/.psa.shadow)" mysql --silent --skip-column-names -u admin psa -e 'SHOW VARIABLES LIKE '"'"'socket'"'"''
exit code: 1
stdout:
stderr: ERROR 1045 (28000): Access denied for user 'admin'@'localhost' (using password: YES) -
Attempt to connect to Plesk database fails:
# MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -u admin psa
ERROR 1045 (28000): Access denied for user 'admin'@'localhost' (using password: YES) -
There is a
/root/.my.cnf
or/etc/mysql/conf.d/client-mariadb.cnf
or/etc/mysql/debian.cnf
file on the server containing invalid credentials:# cat /root/.my.cnf
[client]
user=root
password=mypassword
Cause
Invalid MySQL credentials. Additional MySQL configuration files are included.
Resolution
-
Log in to the server over SSH
-
Make sure there are no additional MySQL configuration files like /root/.my.cnf with MySQL password. If it exists, rename it:
# mv /root/.my.cnf /root/.my.cnf.backup
Note: MySQL reads startup options (including credentials, if defined) from the following files, in the below order:
CONFIG_TEXT: /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 -
Additionally, if problem persists, check If there is an !include directive make sure it does not refer to invalid credentials.
Note: Since 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 use the following directive:CONFIG_TEXT: !include /home/mydir/myopt.cnf
Comments
0 comments
Please sign in to leave a comment.