Skip to content

Instantly share code, notes, and snippets.

@nevernormal1
Created April 5, 2010 20:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save nevernormal1/356787 to your computer and use it in GitHub Desktop.
Save nevernormal1/356787 to your computer and use it in GitHub Desktop.
db = rds.create_db_instance(
:db_instance_identifier => "[FILTERED]",
:allocated_storage => 100,
:db_instance_class => "db.m1.small",
:engine => "MySQL5.1",
:master_username => '[FILTERED]',
:master_user_password => '[FILTERED]',
:db_name => '[FILTERED]',
:availability_zone => 'us-east-1c'
)
require 'rubygems'
require 'aws'
rds = AWS::RDS::Base.new(
:access_key_id => '[our-amazon-access-key]',
:secret_access_key => '[our-amazon-secret-access-key]'
)
db.authorize_db_security_group(
:db_security_group_name => 'default',
:ec2_security_group_name => '[our-ec2-security-group]',
:ec2_security_group_owner_id => '[our-aws-account-number]'
)
> mysqldump old_db -u user -p > inventables.sql
> mysql rds_db -u user -p -h [RDS_connection_string] < inventables.sql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment