Symptoms
-
phpMyAdmin shows the following errors on attempt to access the database through Plesk at Domains > example.com > Databases > exampledb > phpMyAdmin:
Connection for exampleuser as defined in your configuration failed
You probably did not create a configuration file. You might want to use the setup script to create one.
Error
MySQL said:#1045 - Access denied for user 'exampleuser'@'localhost' (using password: YES)
mysqli_real_connect(): (HY000/1045): Access denied for user 'exampleuser'@'localhost' (using password: YES) - Repair Kit error:
The user johndoe on the subscription example.com is unable to connect to the database server.
Cause
Password for the database user was modified directly in the database server, therefore Plesk has outdated password stored for the phpMyAdmin connections.
Resolution
Password for the database user should be updated in Plesk:
Note: In case any applications are using this database, the new password must match the one specified in the next steps.
Updating the password using Plesk UI:
- Log into Plesk
- Navigate to the Domains > example.com > Databases > User Management > exampleuser
- Specify a new password, or click on the Generate button
- Click on Ok
Updating the password using Plesk CLI:
-
Run the following command in the console:
# plesk bin database --update-dbuser exampleuser -passwd 'new_password' -server localhost:3306
Note: In case password for the remote database user should be updated, its host and port should be specified instead in the
-server
option.