title: Warning: mysqli::mysqli(): (HY000/1045): Access denied for user 'database'@'localhost' (using password: NO) in
body: <p>I'm trying to connect my database with php, I've got this error:</p>
  
  <blockquote>
    <p>Warning: mysqli::mysqli(): (HY000/1045): Access denied for user 'typen'@'localhost' (using password: NO) in C:\wamp64\www\Login test 2.0\connectivity.php on line 7</p>
  </blockquote>
  
  <p>My php code is:</p>
  
  <pre><code>&lt;?php
  $servername = "localhost";
  $username = "typen";
  $password = "";
  
  $conn = new mysqli($servername, $username, $password);
  if ($conn-&gt;connect_error) {
   die("Connection failed: " . $conn-&gt;connect_error);
  }
  echo "Connected successfully";
  </code></pre>
  
  <p>Error notification:</p>
  
  <p><a href="https://i.stack.imgur.com/uuILR.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/uuILR.png" alt="enter image description here"></a></p>
  
  <p>My data base name is: "typen"
  it's run on a whampserver (localhost)
  And as far as I know I don't have a password set for my database, I don't even have a password for phpmyadmin.</p>
  
  <p>Pls help me.</p>