jeudi 24 septembre 2015

I am a AWS newbie and I can't connect to my DB instance

I am trying to do something ridiculously simple in PHP - connect to a DB instance. I can connect to it from my query browser using he endpoint provided but when I try to do it in the server PHP code, it throws an error of "Error: Unable to connect to MySQL. Debugging errno: 2003 Debugging error: Can't connect to MySQL server on 'ENDPOINT' (110) "

(I replaced my actual endpoint with the word ENDPOINT for security reasons)

I am not sure what I am doing wrong. I can point my MySQL query browser sitting on my desktop to that endpoint, provide the username/password and all is good. But as soon as I try to do it in the code with a mysqli_connect line of $link = mysqli_connect('ENDPOINT', 'USERNAME', 'PASSWORD','innodb',3306); it returns the can't connect error.

Can anyone help me out in plain english - how do I do a simple PHP connection to a AWS RDS DB instance?

Aucun commentaire:

Enregistrer un commentaire