My code has been working on GoDaddy for months, I haven’t touched it, but now something happened and I’m seeing
“Could not connect to the database :SQLSTATE[28000] [1045] Access denied for user ‘[email protected]’@’www.biosistemasing.com’ (using password: YES)”
- I have no idea what www.biosistemasing.com is
- I have deleted my entire code base and re-uploaded from backup
- I have tried adding different [email protected], @%, etc
- I have verified the username/password still work
Why is PDO attaching a different @ at the end of my connection and how do I fix that?
***
$host = 'host_ip_address';
$db_name = 'dbname';
$username = 'readonly';
$password = 'password';
$dbh = null;
try {
$dbh = new PDO("mysql:host=$host", $username, $password);
echo "Connected to $dbname at $host successfully.";
} catch (PDOException $pe) {
die("Could not connect to the database $dbname :" . $pe-
>getMessage());
}
***