| « PreviousNext » | |
| Did this page help you? Yes | No | Tell us about it... |
The easiest way to create a DB instance is to use the Amazon RDS console. Once you have created the DB instance, you can use standard MySQL utilities such as MySQL Workbench to connect to a database on the DB instance.
Important
You must complete the tasks in the Setting Up section before you can create or connect to a DB instance.
Topics
The basic building block of Amazon RDS is the DB instance. This is the environment in which you will run your MySQL databases.
In this example, you create a DB instance running the MySQL database engine called west2-mysql-instance1, with a db.m1.small DB instance class, 5 GB of storage, and automated backups enabled with a retention period of one day.
To create a MySQL DB instance
Sign in to the AWS Management Console and open the Amazon RDS console at https://console.aws.amazon.com/rds/.
In the top right corner of the Amazon RDS console, select the region in which you want to create the DB instance.
In the navigation pane, click Instances.
Click Launch DB Instance. The Launch DB Instance Wizard opens on the Engine Selection page.
On the Engine Selection page, click Select for the MySQL DB engine.
On the DB Instance Details page, specify your DB instance information. The following table shows settings for an example DB instance. When the settings are as you want them, click Continue.
| For this parameter... | ...Do this: |
|---|---|
|
License Model |
Select the default, |
|
DB Engine Version |
Select the default version of MySQL. Note that Amazon RDS supports multiple versions of MySQL in some regions. |
|
DB Instance Class |
Select |
|
Multi-AZ Deployment |
Select |
|
Auto Minor Version Upgrade |
Select |
|
Allocated Storage |
Type |
| Use Provisioned IOPS |
Leave the check box unselected. This option turns on Provisioned IOPS (I/O operations per second), a high-performance storage option in Amazon RDS that is optimized for I/O-intensive, transactional (OLTP) database workloads. |
|
DB Instance Identifier |
Type a name for the DB instance that is unique for your account in the region you
selected. You may chose to add some intelligence
to the name such as including the region and DB
engine you selected, for example
|
|
Master User Name |
Type a name using alphanumeric characters that you will use as the master user name to log on to your DB instance. This will be the user name you use to logon to your database on the DB instance for the first time. |
|
Master User Password |
Type a password that contains from 8 to 16 printable ASCII characters (excluding /,", and @) for your master user password. This will be the password you will use when you use the user name to logon to your database. |
On the Additional Configuration page, provide additional information that RDS needs to launch the MySQL DB instance. The table shows settings for an example DB instance. Specify your DB instance information, then click .
| For this parameter... | ...Do this: |
|---|---|
|
Database Name |
Type a name for your database of up to 8 alpha-numeric characters. If you do not provide a name, Amazon RDS will not automatically create a database on the DB instance you are creating. |
|
Database Port |
Leave the default value of Important You cannot change the port once you create the DB instance, so it is very important that you determine the correct port to use to access the DB instance. |
|
Choose a VPC |
This setting depends on the platform you are on. If you are creating a DB instance on the
EC2-VPC platform, select the default VPC. If you
are creating a DB instance on the E2-Classic
platform, select |
|
Publicly Accessible |
(Only applies if you choose a VPC) Select |
|
Availability Zone |
Leave the default of |
|
Option Group |
Select the default value of |
|
Parameter Group |
Leave the default value of |
|
DB Security Groups |
Select the DB security group that you created in a previous step in the Getting Started section. |
On the Management Options page, you can specify backup and maintenance options for your DB instance. Accept the default values, and then click Continue.
On the Review page, review the options for your DB instance. If you need to make any changes, click Back to return to the appropriate page, and then make the necessary corrections. When all the settings are as you want them, click Launch DB Instance.
On the final page of the wizard, click Close.
On the RDS console, the new DB instance appears in the list of DB instances. The DB instance will have a status of creating until the DB instance is created and ready for use. When the state changes to available, you can connect to a database on the DB instance. Depending on the DB instance class and store allocated, it could take several minutes for the new DB instance to become available.
Once Amazon RDS provisions your DB instance, you can use any standard SQL client application to connect to a database on the DB instance. In this example, you connect to a database on a MySQL DB instance using MySQL monitor commands. One GUI-based application you can use to connect is MySQL Workbench; for more information, go to the Download MySQL Workbench page. For more information on using MySQL, go to the MySQL documentation.
To connect to a database on a DB instance using MySQL monitor
Type the following command at a command prompt on a client computer to connect to a database on a MySQL DB instance using the MySQL monitor. Substitute the DNS name for your DB instance for <endpoint>, the master user name you used for <mymasteruser>, and the master password you used for <password>.
PROMPT> mysql -h <endpoint> -P 3306 -u <mymasteruser> -p <password>
You will see output similar to the following.
Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 350 Server version: 5.1.32-log MySQL Community Server (GPL) Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql>
Once you have connected to the sample DB instance that you created, you should delete the DB instance so you are no longer charged for it.
To delete a DB instance with no final DB snapshot
Sign in to the AWS Management Console and open the Amazon RDS console at https://console.aws.amazon.com/rds/.
In the DB Instances list, select the check box next to the DB instance you wish to delete.
Click Instance Actions, and then select Delete from the dropdown menu.
Select No in the Create final Snapshot? drop-down list box.
Click Yes, Delete.