0

I'm trying to connect Prisma to a Supabase PostgreSQL database but keep getting P1001: Can't reach database server errors. Here's my setup:

Environment OS: Windows 11

Tools: Prisma (+ Node.js), Supabase

Connection: Using Supabase's connection pooler

Error pnpm dlx prisma db push

Error: P1001: Can't reach database server at `aws-0-eu-central-2.pooler.supabase.com:5432`
Configuration
Prisma Schema:

prisma
datasource db {
  provider = "postgresql"
  url      = env("DATABASE_URL")
  directUrl = env("DIRECT_URL")
}

.env File:

env

DATABASE_URL="postgresql://postgres.ecvujsgsaevhjcvlslbw:[password]@aws-0-eu-central-2.pooler.supabase.com:6543/postgres?pgbouncer=true&sslmode=require"
DIRECT_URL="postgresql://postgres.ecvujsgsaevhjcvlslbw:[password]@aws-0-eu-central-2.pooler.supabase.com:5432/postgres?sslmode=require"
Diagnostics Performed

Tested with both pooler (6543) and direct (5432) ports

Question Why does Prisma fail to connect and How can I Fix this?

1 Answer 1

0

If this Helps anyone, i updated my prisma version with the latest. and it worked fine

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.