• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

ERROR: PleskDBException 12.5 in Centos 7

juanam

New Pleskian
When I try to access Plesk Panel 12.5 in Centos 7 receives the following message:

ERROR: PleskDBException: Unable to connect to database: mysql_connect(): Access denied for user 'admin'@'localhost' (using password: YES) (Error code: 1045) (Abstract.php:69)

I have fixed with this solution (the only one that worked):
1. run this line, copy the password to some text file:

cat /etc/psa/.psa.shadow

2. vi /etc/my.cnf
i for insert, under [mysqld] add the skip-grant-tables (or skip_grant_tables) option. esc :x! (to get out and save changes)

***3. restart mysql using this line:

systemctl restart mariadb.service

***IMPORTANT*** (and FYI Plesk team!!!) The Plesk 12.5 documentation for CentoOS7 users needs to be updated, because CentoOS7 is running MariaDB and the restart option has CHANGED from previous versions (at least that's what I understood from the CentOS7 forum messages I read)

4. Now you should be able to run the following line to see the incorrect password set up for admin:

mysql -uadmin -p`cat /etc/psa/.psa.shadow` mysql -Ne"select * from user where User='admin';"

5. Reset it to the password you pasted, the correct one:

mysql -uadmin -p`cat /etc/psa/.psa.shadow` mysql -Ne"update user set Password=PASSWORD('$AES-128-....==') where User='admin';"

6. Refresh browser to see you can now login again to Plesk.

The problem is that every day the same thing happens.

But, why do I have to repeat those steps every day?
Is there any way to save them?
  • OS: ‪CentOS Linux 7.2.1511 (Core)‬
  • Plesk version: 12.5.30 Update #30
 
Hi juanam,

it might be the case, that you have an existing, additional ".my.cnf" - file on your server, which can prevent Plesk from using the correct password ( for example at "/root/.my.cnf" ).
 
Hi UFHH01,
See this please:
[root@myvps ~]# find / -name *.cnf
/etc/pki/tls/openssl.cnf
/etc/my.cnf
/etc/my.cnf.d/mysql-clients.cnf
/etc/my.cnf.d/client.cnf
/etc/my.cnf.d/server.cnf
/usr/local/psa/admin/conf/openssl.cnf
/usr/share/mysql/my-huge.cnf
/usr/share/mysql/my-innodb-heavy-4G.cnf
/usr/share/mysql/my-large.cnf
/usr/share/mysql/my-medium.cnf
/usr/share/mysql/my-small.cnf
/usr/share/doc/dovecot/dovecot-openssl.cnf
What is wrong or duplicate?
 
Hi juanam,

there is nothing "wrong"/"dublicate" here, so your root cause still has to be investigated with the help of log - files and depending configuration files.
 
Hi juanam,

due to the case, that your issues/problems are depending to your database and Plesk, it will be wise to investigate issues in your "mysqld.log" and your Plesk logs.



Sometimes, it is as well a good idea to change the log - level, to get more informations in psa - log - files:



Pls. update/patch as well your Plesk version, because we are already at version "12.5.30 Update #39":
Plesk version: 12.5.30 Update #30
Manual update/patch over the command line as user "root" :

/usr/local/psa/admin/bin/autoinstaller --select-product-id plesk --select-release-current --reinstall-patch --install-component base
 
Pls. update/patch as well your Plesk version, because we are already at version "12.5.30 Update #39":

Manual update/patch over the command line as user "root" :

/usr/local/psa/admin/bin/autoinstaller --select-product-id plesk --select-release-current --reinstall-patch --install-component base

When performing the update .....
Trying to start service mariadb... active
done
Trying to establish test connection... ERROR 1045 (28000): Access denied for user 'admin'@'localhost' (using password: YES)
ERROR 1045 (28000): Access denied for user 'admin'@'localhost' (using password: YES)
ERROR 1045 (28000): Access denied for user 'admin'@'localhost' (using password: YES)
failed

***** problem report *****
ERROR while trying to establish test connection
ERROR while trying to establish test connection
Check the error reason(see log file: /dev/stderr), fix and try again
Check the error reason(see log file: /dev/stderr), fix and try again

STOP update_history
Los parches se instalaron correctamente.

How fix this error?
How I can see the log ? => (see log file: /dev/stderr)
 
Hi juanam,

you will notice, that your issue is a known issue/problem, which is often described. Pls. consider to use the FORUM SEARCH next time, or search directly at the Plesk - Knowledge-Base.

Trying to establish test connection... ERROR 1045 (28000): Access denied for user 'admin'@'localhost' (using password: YES)
Pls. read and follow:

 
Hi UFHH01,
I have searched and read this article before asking here. The thing is that it doesn't work to me from the beggining.
It's a vicious circle.....
  • Log into MySQL server:

    # MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -u admin mysql
Result:
[root@myvps ~]# MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -u admin mysql
ERROR 1045 (28000): Access denied for user 'admin'@'localhost' (using password: YES)
 
Back
Top