Error connecting mysql


First of all, I´ve read other posts in forum as well document in knowledge base about MySQL connect error.

Second: I check my account password, database name, user, many times.

However, I getting this error: Connection failed: SQLSTATE[HY000] [1045] Access denied for user ‘epiz_24625864’@‘’ (using password: YES)

I´m using this code:

$servername = "";
$username = "epiz_24625864";
$password = "password";  //it´s not the real password
$dbName = "databasename"; //it´s not the real name

try {
    $conn = new PDO("mysql:host=$servername;dbname=$dbName", $username, $password);
    // set the PDO error mode to exception
    echo "Connected successfully";
catch(PDOException $e)
    echo "Connection failed: " . $e->getMessage();

Can someone help me?

There was a problem with the permissions of your database. I’ve reset the your database permisisons now. Can you please check if your script works now?


It works now! Thanks!!!