title: How to connect to my database sql file from my localhost?
body: <p>I am trying to connect to my database through php. I exported my php database as an sql file as told. I tried to go to connect to it and show a message that i am connect. However I'm not.</p>
  
  <p>Im running my php in netbeans and the file is located in wamp > www</p>
  
  <p>it says ERROR: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES)</p>
  
  <pre><code>&lt;?php
  try {
  $conn = new 
  PDO('mysql:host=localhost;dbname=isad235', "root", 
  "root");
  echo "CONNECTED";
  $sql = "SELECT * FROM members";
  foreach($conn-&gt;query($sql) as $row)
  {
    echo $row;
  }
  }catch(PDOException $e)
  {
   echo 'ERROR: '.$e-&gt;getMessage();
  }
  ?&gt;
  </code></pre>