I can access phpadmin to databases but don't can get access from website witch i building send me this message error.
Connection failed: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES)
i tried different ways to get over but don't get that
how i can solve this problem.
here is my login script.
<?php
define('servername', 'localhost');
define('username' , 'root');
define('password', 'sarf1965');
define('dbname' , 'sandoval_store');
try {
$conn = new PDO("mysql:host=". servername .";dbname=".dbname , username, password);
// set the PDO error mode to exception
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
//echo "Connected successfully";
}
catch(PDOException $e)
{
echo "Connection failed: " . $e->getMessage();
}
?>
thanks i appreciate any help.
Fernando Sandoval
Connection failed: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES)
i tried different ways to get over but don't get that
how i can solve this problem.
here is my login script.
<?php
define('servername', 'localhost');
define('username' , 'root');
define('password', 'sarf1965');
define('dbname' , 'sandoval_store');
try {
$conn = new PDO("mysql:host=". servername .";dbname=".dbname , username, password);
// set the PDO error mode to exception
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
//echo "Connected successfully";
}
catch(PDOException $e)
{
echo "Connection failed: " . $e->getMessage();
}
?>
thanks i appreciate any help.
Fernando Sandoval