Articles in this section

A PHP-based website on Plesk server fails to open: Failed to connect to MySQL: Access denied for user 'jdoe'@'localhost' (using password: YES)

Plesk for Linux kb: technical

Applicable to:

  • Plesk for Linux
  • Plesk for Windows

Symptoms

A PHP-based website fails to open with one of the next messages:

CONFIG_TEXT: Failed to connect to MySQL: Access denied for user 'jdoe'@'localhost' (using password: YES)

CONFIG_TEXT: ERROR [HY000] [MySQL][ODBC 3.5.1 Driver]Access denied for user 'jdoe'@'localhost' (using password: YES)

Cause

Incorrect database credentials settings specified in the website's configuration at /var/www/vhosts/example.com/httpdocs/config.php

Note: The location of the config.php file could be different.

Resolution

  1. Log into Plesk
  2. Go to Domains > example.com > Dashboard > File and set the correct database credentials in the config.php file

Note: If the database credentials are unknown they can be changed as indicated here

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.