Amazon Relational Database Service
User Guide (API Version 2012-01-15)
Print this pageEmail this pageGo to the ForumsView the PDFShare this page on TwitterShare this page on FacebookBookmark this page on DeliciousSubmit this page to RedditSubmit this page to DiggDid this page help you?  Yes  No   Tell us about it...

Creating a DB Instance Running the MySQL Database Engine

When you create a new DB Instance, you need to name it, set the size, determine how long you want to store backups, and give yourself a login and password.

In this example, you create a DB Instance running the MySQL database engine called mydbinstance, with a Small DB Instance class, 20 GB of storage, and automated backups enabled with a retention period of 3 days.

[Note]Note

For information on accessing a DB Instance, refer to the Amazon Relational Database Service Getting Started Guide.

AWS Management Console

To create a DB Instance Running the MySQL Database Engine

To launch an instance

  1. Start the launch wizard:

    1. Sign in to the AWS Management Console and open the Amazon RDS console at https://console.aws.amazon.com/rds/.

    2. From the Amazon RDS Console Dashboard, click Launch DB Instance to start the Launch RDS DB Instance Wizard.

      The wizard opens on the Engine Selection page.

  2. Click the Select button next to the MySQL database engine.

    The wizard continues to the DB Instance Details page. The first page of the wizard displays a list of DB Instance Classes in the DB Instance Class drop-down list. The DB Instance class defines the CPU and memory capacity of your DB Instance.

  3. On the DB Instance Details page, specify your DB Instance details as shown in the following table, then click Continue.

    For this parameter... ...Do this:

    License Model

    Keep the default: general-public-license. This is the only available option for DB Instances running the MySQL database engine.

    DB Engine Version

    Select 5.1.57 (default).

    DB Instance Class

    Select db.m1.small.

    Multi-AZ Deployment

    Select No.

    Auto Minor Version Upgrade

    Keep the default setting of Yes for this example.

    The Auto Minor Version Upgrade option enables your DB Instance to receive minor engine version upgrades automatically when they become available.

    Allocated Storage

    You can specify how much storage in gigabytes you want initially allocated for your DB Instance. For this example, type 20.

    DB Instance Identifier

    The DB Instance is a name for your DB Instance that is unique for your account in a Region. Type mydbinstance in the DB Instance Identifier text box.

    Master Username

    Type a name for your master user in the Master Username text box.

    You use the master user name to log on to your DB Instance with all database privileges.

    Master Password

    Type a password for your master user in the Master User Password text box.

    [Important]Important

    You must specify a password containing from 4 to 16 alphanumeric characters only.

    After you click the Continue button, the Additional Configuration page opens.

  4. Provide additional configuration information for your DB Instance:

    1. Type mydatabase into the Database Name text box.

      When you're creating a DB Instance running the MyQL database engine, you provide a database name so that Amazon RDS will create a default database on your new DB Instance. If you skip this step, Amazon RDS will not create a database on your DB Instance.

    2. Accept the default values for the rest of the parameters available on this page, and then click the Continue button.

      After you click the Continue button, the Management Options page appears. The Management Options panel is where you can specify backup and maintenance options for your DB Instance.

  5. For this example, accept the default values, and then click Continue.

    After you click the Continue button, the Review panel appears.

  6. Review the options for your DB Instance:

    • If you need to correct any options, click the Back to return to previous panels and make corrections.

    • If all your options are entered correctly, click the Launch DB Instance button to launch your new DB Instance.

      After you click the Launch DB Instance button, a message displays stating that your DB Instance is being created.

      This can take a few minutes to complete.

  7. Click the Close button.

    After you click the Close button, the My DB Instances panel appears. Your DB Instance appears in the list on this page with the creating status until your DB Instance is created and ready for use.

    Once your DB instance changes to the available state, you need to authorize access so you can connect to it.

CLI

To create a DB Instance Running the MySQL Database Engine

  • Use the command rds-create-db-instance to create a DB Instance.

    PROMPT>rds-create-db-instance mydbinstance -s 20 -c db.m1.small -e MySQL 
       - u sa -p secretpassword --backup-retention-period 3
    

    This command should produce output similar to the following:

    DBINSTANCE  mydbinstance  db.m1.small  mysql  20  sa  creating  3  ****  n  5.1.57
    SECGROUP  default  active
    PARAMGRP  default.mysql5.1  in-sync
    			

API

To create a DB Instance Running the MySQL Database Engine

  • Call CreateDBInstance with the following parameters:

    • DBInstanceIdentifier = mydbinstance

    • DBInstanceClass = db.m1.small

    • AllocatedStorage = 20

    • BackupRetentionPeriod = 3

    • MasterUsername = sa

    • MasterUserPassword = secretpassword

    Example

    https://rds.amazonaws.com/
       ?Action=CreateDBInstance
       &DBInstanceIdentifier=mydbinstance
       &DBInstanceClass=db.m1.small
       &Engine=mysql
       &MasterUserPassword=secretpassword
       &BackupRetentionPeriod=3
       &AllocatedStorage=20
       &MasterUsername=sa
       &Version=2010-06-28
       &SignatureVersion=2
       &SignatureMethod=HmacSHA256
       &Timestamp=2010-08-13T19%3A36%3A35.512Z
       &AWSAccessKeyId=<AWS Access Key ID>
       &Signature=<Signature>