• 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.

Resolved Error in wdcollect.log: Failed to connect to database server

neo2012

Basic Pleskian
I have:
Ubuntu 16.04.5 LTS‬
Produkt Plesk Onyx
Version 17.8.11 Update #17
MySQl 5.7.23

In the /var/log/plesk/modules/wdcollect.log I found the error:
Failed to connect to database server: SQLSTATE[HY000] [1045] Access denied for user 'admin'@'localhost' (using password: YES)
This error occures since 25.July.2018. And is logged nearly every 10 seconds. No "Connection to server has been established." between.
Maybe because of an Plesk-Update or Package-Update?

I can login in Plesk and everything seem still to be working except this error.

Any Ideas how to solve this?

Thanks!
 
That error message usually means that either the password you are using doesn't match what MySQL thinks the password should be for the user you're connecting as, or a matching MySQL user doesn't exist (hasn't been created).

In MySQL, a user is identified by both a username (test2) and a host (localhost).

The error message you are getting identify the user (test2) and host (localhost) values...


Code:
  'test2'@'localhost'
Check to see if that user exists, using this query from a client you can connect from:

Code:
 SELECT user, host FROM mysql.user
You're looking for a row that has test2 for user, and localhost for host.

Code:
user     host       
 -------  -----------
 test2     127.0.0.1 
 test2     ::1       
 test2     localhost
If that row doesn't exist, then the host may be set to wildcard value of %, to match any other host that isn't a match.

If the row exists, then the password may not match. You can change the password (if you're connected as a user with sufficient privileges, e.g. root
Code:
 SET PASSWORD FOR 'test2'@'localhost' = PASSWORD('mysecretcleartextpassword')
Also verify that the user has privileges on objects in the database.

Code:
 GRANT SELECT ON jobs.* TO 'test2'@'localhost'
 
Hello, thank you for the fast Answer!

The User exists in MySql:

user host
admin localhost
apsc localhost
debian-sys-maint localhost
horde localhost
mysql.session localhost
mysql.sys localhost
pma_J1_CXjaXcj2e localhost
roundcube localhost
slanding_db_user localhost

Even so I didn't create that user and changed nothing. Just at one day the connection to database for watchdog? (error in wdcollect). Is this the default user that plesk uses for db-connection in the admin panel?

Where does Watchdog configure / receive the password for this user?
Would I not corrupt the plesk admin db-access if I just change the password for this user in MySql?
 
Hello Neo,

have you tried the plesk-repair tools fot this case? Maybe permissions or something went wrong?

Did you run an update in advance?


Best regards
 
Hi,

no still didn't use plesk-repair tools. Just updated the packages and recommented plesk onyx updates shown on sart page in admin panel.
I will try now the plesk repair and see what happens.
 
Otherwise please try the following:

Open the file my.cnf, use vi or vim.
Code:
/etc/my.cnf

Change the parameter "bind-address" as follows:
Code:
bind-address = 0.0.0.0
Make sure that the parameter skip-networking is not defined in the file my.cnf. Remove it, if exists.

Save changes and close the file.

Restart Mysql:
Code:
service mysqld restart
If you use MariaDB:
Code:
service mariadb restart
 
Back
Top