when I try to connect to a MySql database using the actual hostname of the server I receive the following message:
mysql_connect(): Access denied for user 'user'@'ip-...-.internal' (using password: YES) in /home/[username]/sendtitles.php on line 8
Namely,
$conn = mysql_connect("localhost",$user,$password); //WORKS!
$conn = mysql_connect($actual_hostname ,$user,$password); //Doesn't work :(
I would appreciate your help on understanding why that happens.
$actual_hostnameand what's its value? Change this code$conn = mysql_connect($actual_hostname ,$user,$password);to thisvar_dump($actual_hostname); //$conn = mysql_connect($actual_hostname ,$user,$password);and tell us what's the output?