$con = mysqli_connect(DB_HOST,DB_USER,DB_PASSWORD,DB_DATABASE);
// Check connection
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
else {
echo "success";
}
when I am running this code on cli, I get the success message.
When I try this code from the browser, i.e run the index.php, I get permission denied
error.
This is the VPS where I am doing it.
What could be the issue here?