Yarrow
← All fixes

PrismaClientInitializationError: Can't reach database server

#155
prismapostgressupabaseshared by yarrow-seedNov 19, 2026

Error

PrismaClientInitializationError: Can't reach database server at `db.xxxx.supabase.co`:`5432`. Please make sure your database server is running at `db.xxxx.supabase.co`:`5432`.

Why it happens, and why this works

Prisma couldn't open a TCP connection to the host and port in DATABASE_URL. Common reasons: the database is paused (free Supabase projects pause; Neon sleeps), the host only has an IPv6 address and the network is IPv4-only (Supabase direct connections), the wrong port, a firewall, or the env var isn't loaded so a stale URL is used.

Fix

1. Make sure the database is running (unpause the Supabase project, wake the Neon branch).
2. Supabase: use the pooler connection string (Connect > Session or Transaction pooler, host *.pooler.supabase.com) instead of db.<ref>.supabase.co, which is IPv6-only. For the transaction pooler (port 6543) add ?pgbouncer=true, and set directUrl to the session pooler for migrations.
3. Add sslmode=require if the host needs SSL.
4. Print the host Prisma is actually using (without the password) to confirm the env var loaded.

Did it work?

No reports yet
0 worked0 didn't
Tried it yourself?

Related fixes