Solved

PHP connection to remote AWS MySQL RDS

Posted on 2016-11-10
4
145 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 83

Accepted Solution

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

Expert Comment

by:Phil Phillips
ID: 41883073
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 22

Author Closing Comment

by:Kim Walker
ID: 41883087
That was it Dave. All I had to do was ask for it the port to be opened.
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 41883242
You're welcome, glad to help.
0

Featured Post

Now Available: Firebox Cloud for AWS and FireboxV

Firebox Cloud brings the protection of WatchGuard’s leading Firebox UTM appliances to public cloud environments. It enables organizations to extend their security perimeter to protect business-critical assets in Amazon Web Services (AWS).

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

At the beginning of the year, the IT world was taken hostage by the shareholders of LogMeIn. Their free product, which had been free for ten years, all of the sudden became a "pay" product. Now, I am the first person who will say that software maker…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
Steps to create a PostgreSQL RDS instance in the Amazon cloud. We will cover some of the default settings and show how to connect to the instance once it is up and running.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

735 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