LoginSignup
1

More than 5 years have passed since last update.

非AWS環境のRedashからRDSに接続メモ

Last updated at Posted at 2019-01-08

AWSではないところにあるRedashからRDSのデータソースにアクセスする場合は少し面倒なのでメモで残しておく

  • AWSではないサーバ上でRedashが動いている
  • RDSはVPC上にある

RDSのパブリックアクセス許可

まずインターネット越しにVPC内のRDSに接続する許可をする。パブリックアクセシビリティ「はい」を選択

image.png

セキュリティグループでDBのIPを空ける

image.png

RDSにDBユーザを作成

  • rootでログイン
$ mysql -hxxxx-db-all-1-cluster.cluster-xxxxxxxxxxxx.ap-northeast-1.rds.amazonaws.com -uroot -pPassword
  • ユーザ作成。「*」ではなく「%」で指定
MySQL [(none)]> GRANT ALL ON `%`.* TO <user>@'<address>' IDENTIFIED BY 'Password';
Query OK, 0 rows affected, 1 warning (0.06 sec)

Redashでデータソース登録

  • Test ConnectionでSuccessとなること

image.png

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1