Trying to connect to a database that is not on the same host as my site for the first time and not having much luck. The DB is on a godaddy host and I have configured it to allow remote access:
$dbc = mysqli_connect($db_host,$db_user,$db_pass,$db_name);
if (!$dbc) {
die('Connect Error: ' . mysqli_connect_error());
}
and I get the following on page:
Warning: mysqli_connect() [function.mysqli-connect]: [2002] Connection timed out (trying to connect via ‘mydbhostname:3306) in ‘path’ on line 3
Warning: mysqli_connect() [function.mysqli-connect]: (HY000/2002): Connection timed out in ‘path’ on line 3
Connect Error: Connection timed out
Anything I need to look for on my end or something in the script that could be causing this?
EDIT: well it appears everything works when I use mysql, but not mysqli...and mysqli is enabled on the server.