Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8327441
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T01:06:38+00:00 2026-06-09T01:06:38+00:00

First, here’s the setup: AWS EC2 instance is up and running. Port 22,80, and

  • 0

First, here’s the setup:
AWS EC2 instance is up and running. Port 22,80, and 3306 have been added to the Security Groups

RDS DB Instance is up and running. My local IP was added as a CIDR/IP connection. AWS Account ID was added as a EC2 Security Group connection.

It’s a little odd to me that the regions are different. RDS is US East(N. Virginia), EC2 is US West (Oregon).

My local database was successfully imported to RDS. I used the command line like this:

C:\xampp\mysql\bin>mysqldump -u root 'local database' | mysql -- host='Endpoint' --  user='user login' --password='user pwd' ' rds database'

I am also using MySQL Workbench to connect and query the database on rds.
I never did import my backup sql file (‘localhostdatabase.sql’) to rds.

Here is how I am connecting:
(Both options are not working.)

// $serverConnect = mysql_connect('rds endpoint','rds admin','rds pwd');
// $serverConnect = mysql_connect('EC2 elastic ip','rds admin', 'rds pwd');

You can see the error when you click the ‘Demo’ button at http://www.realcardio.com

Do I need to configure a php file? If so, how do I do this?
My web files are stored at /var/www/html. But I don’t know where the php config files are located.

I use WinSCP to connect to EC2. How do I connect to RDS if I need to modify the files here?

I’ll troubleshoot and share anything with you. Just want to get this up and running.
I appreciate any help!

DK

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T01:06:41+00:00Added an answer on June 9, 2026 at 1:06 am

    Ok, there’s a number of issues here so I’ll try to get through all of them:

    1. Unless you like slow performance, your RDS instance and EC2 instance should be in the same region. Easy to change, but do it before you launch.
    2. You don’t need to configure anything in your PHP file other than the credentials for the database and the RDS instance address. You should be using the first option you listed.
    3. The reason you aren’t able to establish a connection is likely because of your security groups. Double and triple-check that your EC2 Security Group is added as “allowed” to your RDS security group. Remember, each security group is different. If, after verifying those settings, it still doesn’t work, then directly add the EC2 instance’s IP address to the RDS security group.
    4. Issues you didn’t ask about: turn off display_errors on your site. It exposes information that you don’t want exposed to your users. Also, don’t use the “mysql_*” functions. They have begun the deprecation process, have more holes than you have pores and also miss out on lots of newer MySQL features. Use PDO or MySQLi instead.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

First here's what I'm using and trying to do: the minimal setup for this
Setup Using MVC 3 + Code First Here are my classes public class Member
First here is my code: I have commented the problem lines protected void Page_Load(object
I have the following problem First here is my code: $day_difference = 1; while
First here's my current setup: models/user.rb class User < ActiveRecord::Base devise :database_authenticatable, :registerable, :recoverable,
Helly guys, first here the jsfiddle example and here my problem. I have 3
first question here. I have a BarChart showing several normal bars and a BarSeries,
first post here so sorry for the length of it. I've been lurking and
This is my first here in Stackoverflow. So I just want to ask question
First timer here, and total noob when it comes to PHP and JavaScript. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.