0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

herokuを使ってデプロイしているアプリのデータベースをSequelProで可視化する!

Posted at

作ったアプリをherokuを使ってデプロイしたはいいけど、データベースが...となったので、SequelProで可視化するためのメモを書いていきます。

開発環境

  • M1 Mac
  • vscode
  • ruby 3.0
  • rails 6.1
  • herokuにデプロイ済み

いざデータベースの可視化

step1

  1. ターミナルより対象アプリのディレクトリに移動
  2. heroku configを実行スクリーンショット 2021-10-17 9.54.06.png

CLEADB_DATABASE_URLに注目です!

step2

SequelProに必要情報を記述していきます。
先ほど確認したCLEADB_DATABASE_URLは以下のような構造になっています。

CLEARDB_DATABASE_URL: mysql://<ユーザー名>:<パスワード>@<ホスト名>/<データベース名>?reconnect=true

これらの情報を以下に記述!!
名前:わかりやすいもので
ポート:3306スクリーンショット 2021-10-17 9.49.35.png

step3

意外と忘れがちなので注意です!

  1. 接続をテストして接続できることを確認する
  2. お気に入りに追加する
  3. 接続

以上で完了です!

0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?