Solved

PHP connection to remote AWS MySQL RDS

Posted on 2016-11-10
4
36 Views
Last Modified: 2016-11-10
I have a client using a MySQL database on Amazon Web Services RDS. I need to connect to that database from my own shared hosting server on Namecheap.com. I have been able to connect from my desktop successfully using MySQL Workbench and have created a php connection script in Workbench. However, my connection is being rejected with the following error:
mysqli::mysqli(): (HY000/2003): Can't connect to MySQL server on 'removed4security.us-east-1.rds.amazonaws.com' (110)

Open in new window

The user privileges are set to accept connection from host %.

I have avoided using AWS in the past as they seem to have reinvented the wheel in hosting administration. Nothing, and I mean nothing, in the AWS control panel even resembles anything I've ever used before. Even the terminology is unfamiliar. Even though I've set up dozens on databases for remote and local access, I am in unfamiliar territory with this system.

Any suggestions?
0
Comment
Question by:Kim Walker
  • 2
4 Comments
 
LVL 82

Accepted Solution

by:
Dave Baldwin earned 500 total points
Comment Utility
You should first verify that NameCheap allows you to connect to external databases.  Some hosts do not allow that.
0
 
LVL 12

Expert Comment

by:Phil Phillips
Comment Utility
Some other things to check on the AWS side:

  1. Your endpoint resolves to a public IP address (just verifies that RDS was set up with an external IP)
  2. The "Security Group" tied to your RDS instance allows port 3306 from the outside
  3. The subnet that the RDS instance is placed in has a route with an internet gateway
0
 
LVL 21

Author Closing Comment

by:Kim Walker
Comment Utility
That was it Dave. All I had to do was ask for it the port to be opened.
0
 
LVL 82

Expert Comment

by:Dave Baldwin
Comment Utility
You're welcome, glad to help.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

AWS Glacier is Amazons cheapest storage option and is their answer to a ‘Cold’ storage service.  Customers primarily use this service for archival purposes and storage of infrastructure backups.  Its unlimited storage potential and low storage cost …
Microservice architecture adoption brings many advantages, but can add intricacy. Selecting the right orchestration tool is most important for business specific needs.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now