Hosting Articles Technical Articles

Error message PDOException: SQLSTATE[28000] [1045] Access denied for user

 

 

 

Error message PDOException: SQLSTATE[28000] [1045] Access denied for user

Description:

Whilte accessing the drupal website it is giving Error message PDOException: SQLSTATE[28000] [1045] Access denied for user message on the website.Here is the complete error

Error

The website encountered an unexpected error. Please try again later.

PDOException: SQLSTATE[28000] [1045] 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).

Error message PDOException

Solution:

– 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

array (
    ‘default’ =>
    array (
      ‘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

About the author

admin

Add Comment

Click here to post a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.