Configuring a MySQL Database on Amazon RDS

Perhaps you’ve noticed that cloud-based database solutions have really taken off in recent years.  Although concerns about ownership and security have put a damper on some companies’ aspirations to offload some or all of their database management to a third party, the vast majority of companies have embraced the new paradigm and are reaping substantial financial rewards as a result.

In today’s article, we’ll learn about the different cloud database categories, as well as how to configure a MySQL database on the Cloud, using Amazon RDS as our case study.

What is the Cloud?

Before we get into the specifics of how to set up a MySQL Amazon RDS database, let’s begin by defining exactly what the Cloud is and how it applies to database management.

“The Cloud” usually consists of one or more buildings that house a vast network of servers that provide applications and services to businesses and individuals all around the world.  In other words, the Cloud refers to software and services that run on the Internet, instead of locally on your computer.  Most cloud services can be accessed through a Web browser like Firefox or Google Chrome, and some companies offer dedicated mobile apps.  Examples of cloud services include Google Drive, Apple iCloud, Netflix, Yahoo Mail, Dropbox and Microsoft OneDrive.

Having a third party manage some of your business processes and/or resources is not really a new idea, but the rise of the mobile Web, along with faster network speeds, have made this type of arrangement far more attractive than it once was.

Database as a Service (DBaaS)

Services offered by Cloud companies include Software as a Service (SaaS), Platform-as-a-Service (PaaS), Infrastructure as a Service (IaaS), and most relevant to us, Database as a Service (DBaaS). 

Let’s now take a moment to examine why many companies are choosing to move some or all of their data operations to the Cloud.

Traditionally, one or more databases were housed on company property and run on the IT department’s infrastructure. Database development and management were the purview of IT staffers of the organization.

By comparison, the DBaaS model is based on a fee-based subscription service whereby the database runs on the cloud provider’s infrastructure. Different service levels are usually available. In a classic DBaaS arrangement, the provider maintains the physical infrastructure and database, while letting the customer manage their database’s contents and operation.

Alternatively, a customer can set up a managed hosting arrangement, in which the cloud provider handles database maintenance and management. This latter option is especially suitable to small businesses that need a database, but lack the requisite IT expertise.

Reasons for migrating on-premises databases to cloud implementations are numerous, including:

  • allows IT to dispense with on-premises physical server and storage infrastructure;
  • provides expertise for companies whose IT lacks adequate in-house database know-how;
  • increases processing efficiency, especially when applications and analytics that access the data also reside in the cloud; and
  • achieves cost savings through:
    • reduction of in-house IT staff;
    • continually declining cloud service pricing;
    • paying for only the resources actually consumed, known as pay-as-you-go pricing;
    • effective way to further enhance business application performance as part of a wider Software-as-a-Service (SaaS) deployment; and
    • storage consolidation. Databases in multiple departments of a large company, for example, can be combined in the cloud into a single hosted database management system.

About Amazon Relational Database Service (RDS)

Part of Amazon Web Service (AWS, Relational Database Service (RDS) offers a variety of fully managed database options.  AWS database services include:

  • Amazon Relational Database Service (Amazon RDS): traditional RDBMSes with support for six commonly used database engines, including Amazon Aurora, Oracle, Microsoft SQL Server, PostgreSQL, MySQL and MariaDB.
  • Amazon Aurora: a MySQL and PostgreSQL-compatible relational database lightning fast performance.
  • Amazon DynamoDB: a fast and flexible NoSQL database service.
  • Amazon Redshift: a petabyte-scale data warehouse service.
  • Amazon Elasticache: an in-memory cache service with support for the Memcached and Redis open-source in-memory caching engines.

Configuring a Database on Amazon RDS

In Amazon RDS, your database is called a “DB instance”. The DB instance is more than just the database; it’s also an environment where you create and manage your MySQL databases.

The first thing we’ll do is sign up for Amazon Web Services (AWS).  Then, we’ll move on to the creation of a DB instance.

About AWS

Your AWS account gives you access to a whole host of services in AWS, including virtual servers, cloud storage, application services, and, of course, DB services such as Amazon RDS.

AWS operates under a pay-as-you-go model, whereby you are charged only for the services that you use.  You’ll be happy to know that there are quite a few DB options that are completely free to use – and that includes the ones that we’ll be using here today.

Assuming that you don’t already have an account with Amazon AWS, navigate to the Amazon AWS site and create an account using the Sign Up button:

     Amazon AWS
      Amazon AWS

Setting up our DB Instance

Once you’ve created your Amazon AWS account, you’ll be granted access to the AWS Management Console.

1.Sign in to the Amazon AWS and open the Amazon RDS console by selecting My Account > AWS Management Console from the main menu:

     Amazon RDS Console
      Amazon RDS Console

The AWS Management Console is where you can access all of the AWS services.

2.A great thing about Amazon Web Services is that they give you more control over server location than some cloud services.  In the top right corner of the AWS Management Console, you’ll see a list of location choices:

     AWS Location Choices
      AWS Location Choices

3.Click on RDS from the Database section to select that service:

     RDS
      RDS

4.Click Launch DB Instance to start the Launch DB Instance Wizard:

     Launch DB Instance
      Launch DB Instance

The wizard opens on the Select Engine page

5.In the Select Engine window, click the Radio button for the MySQL DB engine:

     Select Engine
      Select Engine

The Production? page asks if you are planning to use your new DB instance for production or development and/or testing. If you choose Production, note that you will incur costs for using the service. Therefore, I would recommend that you select the Dev/Test Radio button for this exercise:

     Production or Dev/Test
      Production or Dev/Test

6.Click on the Next Step button to continue.

The Specify DB Details page appears.

7.On the Specify DB Details page, specify your DB instance information. I would recommend that you click the Only show options that are eligible for RDS free Tier checkbox so that you don’t accidently select a paid service:

     Specify DB Details
      Specify DB Details

8.Click on the Next Step button to continue.

The Configure Advanced Settings page appears.

9.On the Configure Advanced Settings page, provide additional information that Amazon RDS needs to launch the DB instance:

     Configure Advanced Settings
      Configure Advanced Settings

10.Click the Launch DB Instance button to create your instance.

11.On the final page of the wizard, click on the View Your DB Instances button to view your new instance in the RSD dashboard:

     View Your DB Instances
      View Your DB Instances

On the RDS dashboard, the new DB instance has a status of “creating” until the DB instance is ready to use. When the state changes to “available”, you can connect to the DB instance. While a production level instance can take up to 20 minutes before it is available, a smaller development and testing instance should be up-and-running almost immediately:

     RDS Dashboard
     RDS Dashboard

Conclusion

Today we learned about the different cloud database categories, as well as how to configure an Amazon RDS MySQL instance.  In the next article, we’ll cover the important business of configuring the network and security settings and learn a few ways to connect to our database.

See all articles by Rob Gravelle

Robert Gravelle
Robert Gravelle
Rob Gravelle resides in Ottawa, Canada, and has been an IT guru for over 20 years. In that time, Rob has built systems for intelligence-related organizations such as Canada Border Services and various commercial businesses. In his spare time, Rob has become an accomplished music artist with several CDs and digital releases to his credit.

Get the Free Newsletter!

Subscribe to Cloud Insider for top news, trends & analysis

Latest Articles