Tuesday, 15 May 2012

Connect to Remote AWS MySQL from GoDaddy via PHP -



Connect to Remote AWS MySQL from GoDaddy via PHP -

i'm having issue connecting remote mysql server hosted amazon web services. can connect mysql server virtually other computer, reason cannot pulled php hosted on godaddy.

here php code:

$cxn = mysql_connect($host,$user,$passwd,$dbname) or die("query died: cannot connect.");

i've added host name mysql server godaddy's cpanel > remote mysql access hosts. know variables correct, because i've tested on server , works fine.

i've been on phone godaddy twice now, , they've said seek asking forum (apart adding mysql host remote access hosts page).

i've checked security grouping aws mysql , made sure open godaddy's hosted ip address...

i'm not sure else do! why isn't working on godaddy's server when working fine on another??

mysql v5.6 --> on aws php v5.4 --> on godaddy

based on the info in question , comments, clear godaddy's network operations team not allow outgoing tcp connection requests on port 3306 (that's mysql's default port).

that means can't originate connection programme running on godaddy server mysql server located elsewhere. if do, stall until tcp connection timeout elapses.

what can this?

ask them allow outgoing 3306 traffic. (not likely, suspect. business model doesn't afford much per-customer network engineering science work.)

try getting mysql server hear on other port, perhaps 8000. 8080, or of commonly used "alternative" http ports. might not blocked. utilize

mysql_connect("$host:$port",$user,$passwd,$dbname)

to connect.

you'll need how aws-resident mysql server hear on nonstandard port.

php mysql amazon-web-services

No comments:

Post a Comment