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.
Im running my php in netbeans and the file is located in wamp > www
it says ERROR: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES)
<?php
try {
$conn = new
PDO('mysql:host=localhost;dbname=isad235', "root",
"root");
echo "CONNECTED";
$sql = "SELECT * FROM members";
foreach($conn->query($sql) as $row)
{
echo $row;
}
}catch(PDOException $e)
{
echo 'ERROR: '.$e->getMessage();
}
?>