Post navigation

Amazon RDS – The Beginner’s Guide

On the eve of Microsoft’s announcement of the public release of SQL Azure Database, Amazon decides to release RDS. And that, too, after having resisted users’ demands for a relational database service for a very long time. Preemptive action, perhaps? Whatever it may be, I believe that such a healthy competition can do much good to the Cloud marketplace.

RDS brings with it the promise of MySQL on a Cloud. Having been a MySQL fan for quite some time now, I was itching to get my hands on an AWS account and check out what the hype was all about. Imagine my confusion when I signed up for Amazon RDS and all the AWS Management Console showed me was the EC2 dashboard! It was time I downloaded the Getting Started Guide and went through the rigmarole of studying it.

Setting up the Command Line Interface Tools

Apparently, there is no GUI yet for RDS. The only way to go about using it is through the CLI tools. Setting up the tools, however, can be quite a pain: There are no installers per se; you have to download the archive, extract it, and set up the environment manually. Here’s how I did it on my Windows XP box:

Prerequisites: The CLI tools are written in Java. So you need to have either JDK or JRE installed on your system to be able to run them. I had JRE 6 installed.

The Environment: There are a couple of environment variables that need to be set, manually:

The JAVA_HOME variable, containing the path of the Java runtime installed on the system.

The AWS_RDS_HOME variable, containing the path to the folder containing the CLI tools.

C:\>set JAVA_HOME=E:\Java\jre6

C:\>set AWS_RDS_HOME=C:\Amazon RDS\CLI

The Credential File: The archive containing the CLI tools also had a file named credential-file-path.template. I copied my AWS Access and Secret Keys into the place holders in the file, and then had to set yet another environment variable:

Setting up SQLyog/MONyog to Connect to Amazon RDS

Here’s the best part about Amazon RDS: It has native MySQL 5.1 support. (Well, at this time, it supports no other RDBMS, but may be it will in the future.) This means that I can use my favorite MySQL GUI tool to connect to the Amazon RDS database instance. Or at least that’s what Amazon claims.

SQLyog settings for RDS

I filled in the master user name and password that I had used to create the DB instance. For the host address, I used webyogtestinstance.clc2ed76md1v.us-east-1.rds.amazonaws.com (I noticed it in the output of the rds-describe-db-instances command).

Apprehensively, I clicked on the Test Connection button and without a hitch it connected successfully. Notice that SQLyog reports as having connected to MySQL 5.1.38-log.

MONyog displaying the InnoDB Cache stats

In Conclusion

RDS is but a MySQL 5.1 instance running on an EC2 platform, bringing with it all the advantages of EC2. You can scale your server to use up to 68GB of memory, 26 ECUs, and 1TB of persistent storage. On the flip-side, Amazon RDS does not support replication yet.

Periodically, the Amazon RDS system performs some maintenance of the database instance. This ensures that your server is running smoothly. This also translates into a 4-hour down time period on a weekly basis. Within a weekly 4-hour user-definable window (the maintenance window) Amazon’s management system may start back-ups or roll out patches for the MySQL server. This may, however, result in a certain amount of downtime of your DB instance.

There is a pattern emerging here, if you look close enough. Back in 2008, at about the same time, when it became clear that Microsoft would announce a Windows-based Cloud, Amazon jumped in and announced support for Windows-based EC2 instances. And Amazon has managed to do it again with RDS. Microsoft, it seems, drives Amazon harder than users do.

For us at Webyog this is an exciting development. We believe that our products (SQLyog and MONyog) are very well ‘fit for the Cloud’. Much more fit than the console-based tools that most advanced users still seem to use. We will now start checking our programs in detail with this. Till now we’ve found no issues.

“Periodically, the Amazon RDS system performs some maintenance of the database instance. This ensures that your server is running smoothly. This also translates into a 4-hour down time period on a weekly basis.”

What? That’s a deal breaker for me. I haven’t read anything like this in the docs yet. Can you point me to your reference?

Hi Grig,
Funnily enough, the “Getting Started Guide” doesn’t mention anything about maintenance. However, try the “Developer’s Guide” (page 8): There’s a short and precise paragraph on maintenance. Also, the “Command Line Interface Reference” includes several allusions to “maintenance windows” and how to change the default window.

You are absolutely correct. You have to set up access permissions for different users, and host IPs. In my opinion, these stringent security measures are very much needed. More so because the only way you can access your DB instance is through the Internet.

You could try SQLyog for that. Once you have your Amazon RDS instance set up (and don’t forget security settings for MySQL, and firewall settings available through the AWS interface) just put in the details into the connection settings dialog in SQLyog (screen-shots’ are in the blog post), and you should be good to go!

The right-pane in SQLyog shows you all available databases on that instance, and creating/delete new databases is a breeze through SQLyog’s GUI!

MONyog was not installed on RDS. MONyog connects from a remote machine. It works for MySQL on RDS (but system counters – CPU, Memory etc – are not available as reading the information over SSH is not supported by Amazon RDS).

You are making a wrong assumption! This “MONyog looks to be a service you install locally” is wrong. MONyog will connect from any computer to MySQL on any other computer. Just like most other MySQL clients do.

Set up MONyog
* install it on an computer (Windows or Linux – for isntance the one you are sitting with right now).
* register the MySQL server on the RDS (use SSH tunnel and ensure that port 22 is open in the RDS)
* connect to MONyog from a Internet browser. MONyog exposes its information as a HTTP service.

The machine where MySQL runs, where MONyog runs and where the Browser opens may be 1,2 or 3 different machines. Please simply just try aand and do not make assumptions like ” .. looks to be .. ”

If you want to continue this discussion/have some problems/need help please discuss in our Forums ( http://www.webyog.com/forums/ ) and not here.

Hey am new to amazon RDS. I have created a database on Amazon RDS. Please help to on how to access the tables and also modify them using java. I am working in eclipse.
there are plenty of samples available on simpleDB and dyanamoDB, but not on RDS for the above process in eclipse.