I am trying to connect to my database using the following code:
<?php
$mysql_host = "mysql*.000webhost.com";
$mysql_database = "a******_account";
$mysql_user = "a******_admin";
$mysql_password = "******";
// Create connection
$con=mysqli_connect($mysql_host, $mysql_user, $mysql_password, $mysql_database);
// Check connection
if (mysqli_connect_errno($con))
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
};
?>
Does anyone know what is going on? The error messages are:
Warning: mysqli_connect() [function.mysqli-connect]: (28000/1045): Access denied for user 'a******_admin'@'0.0.0.0' (using password: YES) in /home/a3996154/public_html/index.php on line 18
and
Failed to connect to MySQL: Access denied for user 'a******_admin'@'0.0.0.0' (using password: YES)