当我想与PDO
联系时:
<?php
$host_name = "localhost";
$database = "pdo"; // Change your database name
$username = "root"; // Your database user id
$password = "test"; // Your password
//////// Do not Edit below /////////
try {
$dbo = new PDO('mysql:host=' . $host_name . ';dbname='.$database, $username, $password);
} catch (PDOException $e) {
print "Error!: " . $e->getMessage() . "<br/>";
die();
}
?>
我收到此错误消息:
Error!: SQLSTATE[28000] [1045] Access denied for user 'user_name'@'ip.address' (using password: YES)
PS:通常我会填写我的服务器信息。