Connecting MySQL DB Instance present on AWS Cloud

Folks,

For creation of any Amazon RDS DB Instance (Free Tier), kindly visit this blog: Link

In this blog we will learn how to connect MySQL Database present on AWS Cloud.

Here is my MySQL DB Instance in “available” Status. Please note the End Point, which is basically the HOST.

1
RDS Dashboard

Step for adding new Inbound Rule for allowing connection on port 3306.

Select MySQL Instance & Click on “Instance Actions“->”See Details“.

2

After that click on “Security Groups“.

3

Now click on the “Inbound Rules” in Security Groups page.

4
Security Groups Page

Create a Inbound Rule for Type: MYSQL, Protocol: TCP , Port: 3306 Source: Anywhere. So that you can connect this instance from any machine. After creation of rule click on Save.

Security Group is basically allowing the connections on the port.

5

After Saving Inbound Rule. Go to RDS Dashboard.

1
RDS Dashboard

Now MySQL Instance is ready to connect & use it.


 

Steps for connecting MySQL Database: Using CMD

Install MySQL Server on your machine. Copy the location on bin folder in program files.

Also check your firewall settings for port 3306.

7

Also check the MySQL service is running properly or not.

6

Open Command Prompt: Use this command: cd <bin folder location> then Press Enter.

Example:  cd C:\Program Files\MySQL\MySQL Server 5.1\bin

Now you are in bin folder.

8

Use below command in cmd & it will ask for password.

mysql – h <host> -P <port> – u <username> – p

Where <host>: Your End Point, <post>:3306, <username>: Master username

9

Now we are connected to the MySQL DB Instance.

10


Steps for connecting MySQL Database: Using MySQL GUI

I’m using SQLyog GUI. Please provide below details.

01

Provide your password & test the connection.

02

Click on connect to connect the database.

03

Now we are connected to the MySQL DB Instance.


Thanks!

Happy Learning!

Advertisements

AWS RDS Instance Setup: Oracle DB on Cloud (Free Tier)

Folks,

AWS Free Tier (Link), the Amazon RDS Free Tier helps us to get started with a database instance in the cloud. Free for 12 months starting with the date on which we create our AWS account.

We can use this to develop new applications or simply gain hands-on experience with Cloud Computing. It is easy to set up, operate, and scale DB.

Database Available:- MySQL, MariaDB, PostgreSQL, Oracle & SQL Server.

Steps for creating your own: Oracle DB Instance on Cloud (Free Tier)

Login AWS with your amazon account. Link

0
Amazon Web Services Login Page

After login AWS redirect to this below Home Page.

Select “RDS” in the Database Section. RDS –  Relational Database Service.

1
AWS Home Page

After selecting “RDS” in the Database Section. Below RDS Dashboard comes up.

Click on “Launch a DB Instance” in this screen.

2
AWS RDS Dashboard

Now from here the main setup starts…


 Step 1: Select Engine: Select the DB Engine:

I’m selecting the Oracle EE Database Engine.

3

Step 2: Production Or Free Tier

For Free Tier: Select Option Second: “Dev/Test”

4

After that click on Next Step.

Step 3: Specify DB Details:

Select check box for options available for free tier RDS.

5

Provide DB details here like master username & password. Please note down these details for future reference.

6

After that click on Next Step.

Step 4:  Configure Advanced Settings:

Use default setting here for free tier service.

7

Now we can launch the Instance.

8

After launching: Db instance is being created.

9

Go to the RDS Dashboard: Instance Tab:  You can check your instance here.

10
DB Instance Creation is in process

 

After some time…

Oracle DB Instance is ready. Note down your Endpoint, which is basically the HOST.

11
Db Instance is available now

My End Point: shobhitdbdemo.cbxoxihdzrvi.us-west-2.rds.amazonaws.com:1521


 

Steps for Connecting Oracle Database: Windows

Install Oracle Client on machine. Also check your firewall settings for port 1521. Open Command Prompt & use below command to connect DB.

sqlplus username/password@host:port/service 

Where username: Your Database Master Username in Step 3

Example:

12

12

Now you can create your own database & other database objects.


 

Thanks!

Happy Learning!