Amazon RDS (Relational Database Service) is a web based management console for Relational database engines including MySQL, Oracle, SQL Server, PostgreSQL and Aurora. Why would anyone use Amazon RDS? Well, I’m sure the marketing folks can muster quite a few more reasons, but the ones that hit home for me were the fact that I can let Amazon worry about managing these databases and when they get too big, again, Amazon can easily scale them out in the cloud rather than trying the same with my own hardware. The following will show you how much (little?) effort is involved in configuring an Amazon RDS MySQL database for use in your own environment. If you’re like me, this is an interesting concept, but the bigger concern is ‘how long will this take me to set up as I don’t have hours to tinker’. Well worry no more as I’ve done the tinkering for in you in the steps below. It’s my hope that the following will give you an idea of how easy and quick it is to set up an Amazon RDS MySQL instance and connect to it via Toad for MySQL. First, you must create an AWS Account . I won’t go into this process in detail as it’s pretty self-explanatory. Ok, all set with an account and logged in, now from the home page , click on RDS ..Click ‘Instances’ then ‘Launch DB Instance’ Select your preferred DB Engine (we’ll go with MySQL, but remember in addition to the options listed, you will soon be able to use Amazon Aurora) Specify whether you plan to use the DB for production purposes (your call, I’m going with No). Specify DB Details. These are pretty subjective, so choose what works for you, in this example, I’m choosing the quickest, smallest configuration I can, but the options are well explained, so you shouldn’t have much trouble if you want to go off script. Specify Settings including instance name, username/password combo, then click ‘Next Step’: Network and Backup options are again pretty subjective, do what you like and click Launch DB Instance It takes a few minutes for a DB Instance to launch… patience …ooooohmmmm… Still waiting, but now I click ‘View your DB Instances’ and see the console: NOTE Status = ‘creating’: Still waiting, click the highlighted triangle below to see expanded details In expanded details, the key bits are here, in that the Endpoint field tells you the MySQL Hostname as well as the port we need to open up. In this case, the hostname is bwulfmysql.cq7zpxbmobx1.us-east-1.rds.amazonaws.com on port 3306 as shown in detail and highlighted here. Once status becomes available, we are ready to connect via Toad for MySQL Now, in Toad for MySQL (get the latest version here ), choose File | New | Connection and enter the endpoint details i.e. host = bwulfmysql.cq7zpxbmobx1.us-east-1.rds.amazonaws.com and your username/password combo like so, then connect. And just like that we have a managed easily scalable MySQL instance that is hosted by Amazon, and we are able to connect to it via Toad for MySQL! Pro Tip : If you are just kicking the tires and playing with Amazon RDS, there isn’t really a way to turn off the instance unless you first take a Snapshot of the instance: …then delete the instance… At which point you can restore the snapshot if you want to bring it online again without leaving it running (and thereby racking up charges). Have fun! Also keep an eye out for Amazon Aurora support on Toad for MySQL as I'll be blogging on that when it becomes generally available.
↧