title: Wordpress error: (HY000/1045): Access denied for user 'root'@'localhost' (using password: YES) wp-db.php on line 1538
body: <p>I get this error message when I try to access wp-admin of my wordpress site:</p>
  
  <p><a href="https://i.stack.imgur.com/k7OA0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/k7OA0.png" alt="Error message"></a></p>
  
  <p>I have set up a local server with Wampserver and it worked fine in the beginning, but now this error message appears whenever i try to go to: localhost/wordpress/wp-admin. </p>
  
  <p>I have tried to change the password and it didn't help. I have also looked up line 1538 in wp-db.php as the error message suggests but I can't see the problem. It looks like this: </p>
  
  <pre><code>if ( WP_DEBUG ) {
      mysqli_real_connect( $this-&gt;dbh, $host, $this-&gt;dbuser, $this-&gt;dbpassword, null, $port, $socket, $client_flags );
  } else {
      @mysqli_real_connect( $this-&gt;dbh, $host, $this-&gt;dbuser, $this-&gt;dbpassword, null, $port, $socket, $client_flags );
  }
  </code></pre>
  
  <p>Hope someone can help me! </p>