Detailed instructions for Amazon RDS database setup and configuration:

First log on to your Amazon cloud with AWS account. Assuming you have AWS account.

Step 1: Launch new Instance

  1. After Login Select RDS from top left corner.
  2. Select Launch a DB Instance.
  3. Select the MySQL engine or any other engine that you need for your site.DB Instance class: db.t1.micro
    1. Allocate Storage: 10 GB
    2. DB Instance Id: xxxx
    3. Master Username: xxxx (need this when you will try to connect to this database from outside or from your site config file)
    4. Master password: xxxx (need this when you will try to connect to this database from outside or from your site config file)
  4. Click continue
    1. Database Name: xxxx (need this when you will try to connect to this database from outside or from your site config file)
    2. Database Port: 3306 (don’t change this it’s important to connect the database from external).
    3. DB Security Groups: List of DB Security Groups associated with this DB Instance. Set it todefault (We use this to add the CIDR/IP that can connect to the database. This is done on different tab.
  5. Launch the instance. Select the instance and you will see following:

Step 2: Important Setting for .php or config file that we need to connect to RDS DB

We need following settings in Settings.php file or any config file of web site so it can connect to the RDS database.

  • Endpoint: The DNS address of the DB Instance.
    • xxx.xxxx.rds.amazonaws.com
  • Master Username: Name of master user for your DB Instance.
    • xxxxxx
  • Master Password
  • DB Name: The definition of the term Database Name depends on the database engine in use. For the MySQL database engine, the Database Name is the name of a database hosted in your Amazon DB Instance.

Step 3: Security Group setup

Here we add the CIPR/IP addresses from where we want to connect to the RDS DB instance.

IMP: For Amazon EC2 instance to connect to the RDS DB instance, the DB security group of your Amazon RDS instance refers to the Private IP address of your Amazon EC2 instance. You can get the Private IP address from your EC2 instance details.

  • Select the DB Security Group from left menu.
  • Select the default group from list.
  • Examples:
    • Default security group has IP address of my machine. I can connect to the RDS DB instance using the EndPoint, MasterUserName and MasterPassword.
    • Default security group has Private IP address of Amazon EC2 instance that we created above to host the Coveros site so that the web site code can talk to the RDS DB instance.

Leave a comment

Your email address will not be published. Required fields are marked *

X