0

When I want to connect with 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();
}
?>

I get this error message:

 Error!: SQLSTATE[28000] [1045] Access denied for user 'user_name'@'ip.address' (using password: YES) 

PS: Normally I fill out with my sever information.

Álvaro González
  • 142,137
  • 41
  • 261
  • 360

0 Answers0