title: Access denied for user 'testweb'@'localhost' drupal site configuration in localhost
body: <p>I have setup a web site in the internet and I try to host it locally and test it.
  Normally, in Drupal database connection can be configured from <code>settings.php</code> file which is located at: <code>\sites\default</code>.</p>
  
  <p>Here is the code that set access:</p>
  
  <pre><code>$databases = array (
    'default' =&gt; 
    array (
      'default' =&gt; 
      array (
        'database' =&gt; 'testweb',
        'username' =&gt; 'testweb',
        'password' =&gt; 'root',
        'host' =&gt; 'localhost',
        'port' =&gt; '',
        'driver' =&gt; 'mysql',
        'prefix' =&gt; '',
      ),
    ),
  );
  </code></pre>
  
  <p>MySQL web user and database names are equal that is testweb.</p>
  
  <p>Here is the error I get.</p>
  
  <blockquote>
    <p>PDOException: SQLSTATE[28000] [1045] Access denied for user 'testweb'@'localhost' (using password: YES) in lock_may_be_available() (line 167 of C:\wamp\www\testweb\includes\lock.inc).</p>
  </blockquote>
  
  <p>Another thing I want to know that is whether Drupal store database connection strings in the database. </p>
  
  <p>I have seen this problem in stackoverflow but it didn't continue to a right solution.</p>