[AWS] How can I let my EC2 server’s PHP files connect to my RDS mySQL database? via /r/learnprogramming


[AWS] How can I let my EC2 server’s PHP files connect to my RDS mySQL database?

I think this might be a security group or VPC issue but I'm quite confused.

Currently I have:

  1. EC2 instance with lamp stack and some php files that want to perform queries against a mySQL Server.
  2. RDS instance containing the database and tables

I can connect to the mySQL instance and preform queries from my laptop using "mySQL WorkBench"

I can connect to my ec2 instance via SSH, putty, cyberduck, or web browser for a couple test pages.


My EC2 server is set to allow inbound traffic from anywhere but SSH only from my IP.

  • I believe my RDS instance is blocking the connection from my EC2's IP.

But…My When I set the RDS instance to allow incoming connections from ANY IP for (MYSQL/Aurora,TCP,3306) my client was still getting an HTTP error 500.

How should one configure the RDS to allow incoming connections from my EC2?

Submitted July 16, 2017 at 05:59PM by whattheaws
via reddit http://ift.tt/2up4DLi

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s