2012/11/14

Amazon RDSでMySQLなDBを作ってみたよ。

■Amazon RDS向けのSecurity Groupの作成

  1. DB Security Groupsに移動し、「Create DB Security Group」を選択。
    image
  2. DB Security Groupの名前、説明を入力し作成する。
    image
  3. DB Security Groupが追加されたことを確認し、接続元となるNWアドレスやAmazon EC2のSecurity Group名などで接続元を絞る設定を入れる。
    (画面では0.0.0.0/0 = すべてのIPアドレスからの接続を許可しようとしている)
    image
  4. 「Add」ボタンを押し、Statusがauthorizing→authorizedに変化したことを確認する。
    image

■Amazon RDS向けのParameter Groupの作成

  1. DB Parameter Groupsから「Create DB Parameter Group」を実行する。
    image
  2. DB Parameter Groupが追加されるので、Viewingに変更したいパラメータ名を入力し、値の変更などを行う。
    image
    image
    image

■Amazon RDS DBインスタンスの作成

  1. DB Instancesから「Launch DB Instance」を実行する。
    image
  2. DBインスタンスとしてMySQLを選択。
    image
  3. DBインスタンスの詳細設定を行う。
    image
  4. 追加設定を行う。
     image
  5. 管理用オプションの設定を行う。(今回は自動バックアップ不要なので変更する)
    image
    image
  6. 最終確認が出てくるので「Launch DB Instance」を押す。
    image
    image

■MySQLクライアントから接続確認を行う。

$ mysql -h clouderadbinstance.xxxxxxx.us-east-1.rds.amazonaws.com -u cloudera –p

Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.5.27 Source distribution

Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>

show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| clouderadb         |
| innodb             |
| mysql              |
| performance_schema |
+--------------------+
5 rows in set (0.00 sec)

mysql>

0 件のコメント:

コメントを投稿