Amazon RDS quick start

I’ve tried to use Amazon Relational Database Service. Easy to scale-up appeals to me.

Official Getting Started Guide is very good. I almost followed this document.

Works on Mac OSX 10.5.8.

% rds-create-db-instance --db-instance-identifier myinstance  --allocated-storage 5 --db-instance-class db.m1.small --engine MySQL5.1 --master-username mymasteruser --master-user-password **** --db-name MyDatabase --headers

It takes several minutes.

% rds-describe-db-instances --headers
Unable to find a $JAVA_HOME at "/usr/", continuing with system-provided Java...
Unable to find a $JAVA_HOME at "/usr/", continuing with system-provided Java...
DBINSTANCE  DBInstanceId  Class        Engine    Storage  Master Username  Status    AZ          Backup Retention
DBINSTANCE  myinstance    db.m1.small  mysql5.1  5        mymasteruser     creating  us-east-1d  1
      SECGROUP  Name     Status
      SECGROUP  default  active
      PARAMGRP  Group Name        Apply Status      PARAMGRP  default.mysql5.1  in-sync
% rds-describe-db-instances --headers
Unable to find a $JAVA_HOME at "/usr/", continuing with system-provided Java...
Unable to find a $JAVA_HOME at "/usr/", continuing with system-provided Java...
DBINSTANCE  DBInstanceId  Created                   Class        Engine    Storage  Master Username  Status     Endpoint Address                                     Port  AZ          Backup Retention
DBINSTANCE  myinstance    2009-10-30T07:01:42.163Z  db.m1.small  mysql5.1  5        mymasteruser     available  myinstance.cpxpgflqvl3w.us-east-1.rds.amazonaws.com  3306  us-east-1d  1
      SECGROUP  Name     Status
      SECGROUP  default  active
      PARAMGRP  Group Name        Apply Status
      PARAMGRP  default.mysql5.1  in-sync

There is an error about $JAVA_HOME, but it works.

% rds-authorize-db-security-group-ingress default --ec2-security-group-name mytestgroup --ec2-security-group-owner-id 69145810****

You can see ec2-security-group-name (Security Groups) and ec2-security-group-owner-id (Owner) on AWS Management Console for EC2.

Login to EC2 server, then:

# mysql -h myinstance.cpxpgflqvl3w.us-east-1.rds.amazonaws.com -P 3306 -u mymasteruser -p

Create snapshot, and delete.

% rds-create-db-snapshot myinstance --db-snapshot-identifier myinstance-snapshot
% rds-delete-db-instance myinstance --skip-final-snapshot true --headers

It takes a couple of minutes.

Restore.

% rds-restore-db-instance-from-db-snapshot myinstance2 --db-snapshot-identifier myinstance-snapshot

Modify instance size (scale-up).

% rds-modify-db-instance myinstance --db-instance-class db.m1.large --apply-immediately

small to large takes about 5 minutes. (mysqldumped-size is 700MB)

similar post:
tpcc-mysql rough benchmark for Amazon RDS

This entry was posted in Tweak and tagged . Bookmark the permalink. Trackbacks are closed, but you can post a comment.

This website uses IntenseDebate comments, but they are not currently loaded because either your browser doesn't support JavaScript, or they didn't load fast enough.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">

  • About

    I'm Nobu, a web developer living in Mountain View, CA. Feel free to comment on any posts. I'm also tweeting on twitter.

  • Archives

  • Recent Posts