Initial Experience of MySQL and Amazon RDS in the cloud

Source: Internet
Author: User

BKJIA, December 10 (Internet headlines) Amazon's RDS Service Relational Database Service (Relational Database Service) has brought us a MySQL Database server in the cloud, making the concept of "Database as a Service" a reality, it provides a fast automatic upgrading/downgrading ladder for existing MySQL applications to enter the cloud.

We know that Amazon EC2 instances can run MySQL, and it also provides SimpleDB service BKJIA editing Note: EC2 is Amazon's flagship cloud computing service, simpleDB is a cloud database service that has been provided before, and can query structured data in real time). Why should we choose SimpleDB?

The name of SimpleDB gives the best reason. SimpleDB is intended to be a simple database. If you only need basic read/write and query functions, SimpleDB is a good choice, but it is not a relational database.

What about running MySQL in EC2 instances? Isn't this the same function as RDS? Yes, but RDS is a key component for using MySQL directly. Unlike EC2 instances, RDS does not need to be configured or managed. Simply put, RDS is almost a pure MySQL database, and there are not many.

Quickly create a DB Instance

From the perspective of users and developers, Amazon RDS is no different from a remote MySQL database. Amazon calls the RDS MySQL server as a DB Instance in the cloud and creates and manages it through Web-based APIs. Other operations can be completed through the standard MySQL communication protocol.

When creating a DB Instance, you must specify some attributes to determine the behaviors and capabilities of the database Instance. For example, the Class attribute determines the available memory and processing capability of the created DB Instance. Amazon uses ECUElastic Compute Unit as its computing capacity Unit. One ECU is equivalent to one 1.0 GHz 2007 Xeon processor.) You can create a Small DB Instance with GB memory and 1 ECU, until the super-Large Quadruple Extra Large) DB Instance with 68 Gb memory and 26 ECU.

You also need to define available storage when creating a DB Instance. The storage range is 5 GB to 1024 GB. You can allocate more data to multiple DB instances, the maximum workload of an Amazon RDS database is 1 TB per table.

Working with RDS

Two things are required for using Amazon RDS: command line tools and MySQL-compatible client applications. The former is a Java application set provided by Amazon. It is responsible for managing DB instances, such as creation, parameter adjustment, and deletion. It can be downloaded from the Amazon website. The latter can be any application that communicates with the MySQL server. Of course, you also need to register Amazon Web Services to obtain the AWS Access ID and AWS Secret Access Key.

 
Figure: After an Amazon rds db Instance is created, it can be managed like any remote MySQL database, such as using the MySQL Administrator tool.
 

After downloading the command line tool, you can start setting environment variables. We can use the following command line to create a small DB Instance1 ECU and 20 GB ):

Rds-create-db-instance -- db-instance-identifier rginstance -- allocated-storage 20 --- db-instance-class db. m1.small -- enging MySQL5.1 -- master-username rgrehan -- master-user-password mypassword -- db-name ADBTest -- headers

This generates a DB Instance named rginstance. The Administrator name is rgrehan and the password is 123456. In this DB Instance, a database named ADBTest is created, and the maximum storage capacity is 20 GB.

If you do not like the command line tool, Amazon has released libraries that support various programming languages, such as Java, C #, PHP, VB. NET, and Perl. RDS management functions are represented by Web services, so these libraries are basically Web service packages that are remotely called.

Pay by usage

A basic principle of Amazon Web Services is to charge based on usage. Similarly, RDS is calculated based on the specific usage of MySQL applications.

DB instances are divided into several categories, each of which has its own price. A small DB Instance is 11 cents per hour, a super large DB Instance is 3 USD 10 cents per hour, and the rest is between the two. The fee is calculated based on the life of the DB Instance, even if it does not respond to any MySQL command. Therefore, you must remember that billing can be stopped only when the database instance is terminated, but data will not be lost. You can request that you create a snapshot when terminating the database and restore it later. Of course, Amazon will charge fees for saving the snapshot, but this is very cheap, as long as 15 cents per GB per month.

Bkjia.com is translated. Do not reprint it if it is not authorized. For reprinted on the Cooperation site, please indicate the original translator and the source is bkjia.com, and the original content cannot be modified .]

Original article: First look: Amazon RDS gives you a MySQL server in the cloud Author: Rick Grehan

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.