Error message PDOException: SQLSTATE  Access denied for user
Whilte accessing the drupal website it is giving Error message PDOException: SQLSTATE  Access denied for user message on the website.Here is the complete error
The website encountered an unexpected error. Please try again later.
PDOException: SQLSTATE  Access denied for user ‘xxxx’@’localhost’ (using password: YES) in lock_may_be_available() (line 167 of /home/domain/public_html/test/includes/lock.inc).
– Drupal is one of the flexiable CMS to build website.Here is the simple steps to resolve the above error.
– In general this issue occur because of the invalid database credentials mention in sites/default/settings.php page.While update the database details in the file check the file permission.
– Settings.php page database options as follows
‘database’ => ‘xxxxxx’,
‘username’ => ‘xxxxxx’,
‘password’ => ‘xxxxxx’,
‘host’ => ‘localhost’,
‘port’ => ”,
‘driver’ => ‘mysql’,
‘prefix’ => ”,
– While enter the database details do not forget to give the prefeix of the database while creating from the cpanel or phpmyadmin.Database prefix example: accountname_databasename.
– After update the database details still the same error exist remove the user and create a new user with strong password and update in settings.php file.That will resolve the issue.
Tags:Tech News,Drupal Installation,Drupal Errors,Drupal issues,Tech articles,Knowledge articles,Latest sql articles