1
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?

【Supabase】 Database の Connection string を確認する

Posted at

はじめに

Prisma と Supabase を接続したいときに Connection string が必要になるのですが、確認する方法が分からなかったのでまとめます。

手順

1. Supabase プロジェクトにログイン

Supabase Dashboardにアクセスして、対象プロジェクトを選択

2. ヘッダー部分の Connect をクリック

image.png
一番右端のやつです。

3. 確認する

Connect をクリックするとモーダルが開かられるので、そこで Direct connection と Transaction pooler などを確認できます。

// Direct connection
postgresql://postgres:[YOUR-PASSWORD]@db.xxxxxxxx.supabase.co:5432/postgres

// Transaction pooler
postgresql://postgres.xxxxxxxx:[YOUR-PASSWORD]@aws-0-ap-northeast-1.pooler.supabase.com:6543/postgres

[YOUR-PASSWORD]は、プロジェクトを作成したときのパスワードに置き換えてください。
例) パスワードが hello world なら
postgres://postgres:hello world@db.xxxxxxxx.supabase.co:5432/postgres
になります。

View parameters をクリックすると host や port 番号なども確認できます。

おわりに

確認方法はすごくシンプルでしたが、見つけるまでに 30 分ほどかかりました...

1
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
1
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?