LoginSignup
6
3

More than 5 years have passed since last update.

metabaseでec2上のDBに接続してみた

Posted at

概要

https://qiita.com/acro5piano/items/0920550d297651b04387
記事を見て面白そうだと思い、簡単に触ってみました。

インストール

  1. 公式サイトからダウンロード
    https://www.metabase.com/start/
    いろんなやり方はありますがmacアプリで実行しました。
    インストールして完了です。簡単です。  

  2. SSHトンネルを作成
    DBの接続先がAWSのEC2に構築しています。
    EC2にはsshの秘密鍵認証で接続します。
    ※sshの鍵認証は現在対応出来ていないっぽい??
    https://github.com/metabase/metabase/issues/5153
    コマンド参考:https://github.com/metabase/metabase/blob/master/docs/administration-guide/01-managing-databases.md

## ターミナルから実行
ssh -Nf -L input-port:internal-server-name:port-on-server username@bastion-host.domain.com
## こんな感じで実行しました
ssh -i ~/.ssh/id_rsa -Nf -L 3304:localhost:3306 xxxxx@xx.xxx.xxx.xx

3.metabase設定
Monosnap 2018-01-15 21-51-12.png

これから色々触って見たいと思います

6
3
0

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
6
3