I'm having an issue connecting to a remote MySQL server that is hosted by Amazon Web Services. I can connect to this MySQL server from virtually any other computer, but for some reason I cannot get it to be pulled into my PHP that is hosted on GoDaddy.
Here is the PHP code:
$cxn = mysql_connect($host,$user,$passwd,$dbname)
or die("Query died: Cannot connect.");
I've added the host name for the MySQL server into GoDaddy's CPANEL > Remote MySQL Access Hosts. I know that the variables are correct, because I've tested this on another server and everything works fine.
I've been on the phone with GoDaddy twice now, and all they've said is to try asking a forum (apart from adding the MySQL host to the Remote Access Hosts page).
I've checked the security group for the AWS MySQL and made sure that it is open to the GoDaddy's hosted IP address...
I'm just not sure what else to do! Why isn't this working on GoDaddy's server when it was working just fine on another??
MySQL v5.6 --> on AWS PHP v5.4 --> on GoDaddy