Cannot connect to Supabase database
See original GitHub issueBug description
I cannot connect to my Supabase database with the URI. However on the other hand I can connect without prisma directly with psql
.
This is the command with which I connected to my database:
psql -h db.nauqxqbyeqpccehwqegs.supabase.co -p 5432 -d postgres -U postgres
And this is my URI:
DATABASE_URL="postgresql://postgres:[mypasswordhere]@db.nauqxqbyeqpccehwqegs.supabase.co:5432/postgres"
How to reproduce
Step to reproduce:
I have tried it a lot, and Every time regardless of changing my db password or restarting server. And when I ran npx prisma db pull
. Nothing changes.
This is the error:
Prisma schema loaded from prisma/schema.prisma
Environment variables loaded from .env
Datasource "db": PostgreSQL database "postgres", schema "public" at "db.nauqxqbyeqpccehwqegs.supabase.co:5432"
✖ Introspecting based on datasource defined in prisma/schema.prisma
Error: P1001
Can't reach database server at `db.nauqxqbyeqpccehwqegs.supabase.co`:`5432`
Please make sure your database server is running at `db.nauqxqbyeqpccehwqegs.supabase.co`:`5432`.
Expected behavior
No response
Prisma information
My Prisma Schema
// This is your Prisma schema file,
// learn more about it in the docs: https://pris.ly/d/prisma-schema
generator client {
provider = "prisma-client-js"
}
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
Environment & setup
- OS: MX LINUX 21
- Database: Postgresql
- Node.js version: v16.13.2
Prisma Version
npx prisma -v
Environment variables loaded from .env
prisma : 3.14.0
@prisma/client : 3.14.0
Current platform : debian-openssl-1.1.x
Query Engine (Node-API) : libquery-engine 2b0c12756921c891fec4f68d9444e18c7d5d4a6a (at node_modules/@prisma/engines/libquery_engine-debian-openssl-1.1.x.so.node)
Migration Engine : migration-engine-cli 2b0c12756921c891fec4f68d9444e18c7d5d4a6a (at node_modules/@prisma/engines/migration-engine-debian-openssl-1.1.x)
Introspection Engine : introspection-core 2b0c12756921c891fec4f68d9444e18c7d5d4a6a (at node_modules/@prisma/engines/introspection-engine-debian-openssl-1.1.x)
Format Binary : prisma-fmt 2b0c12756921c891fec4f68d9444e18c7d5d4a6a (at node_modules/@prisma/engines/prisma-fmt-debian-openssl-1.1.x)
Default Engines Hash : 2b0c12756921c891fec4f68d9444e18c7d5d4a6a
Studio : 0.460.0
Issue Analytics
- State:
- Created a year ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Prisma unable to connect to Supabase database #7772 - GitHub
Bug report Describe the bug Prisma npx commands and Prisma Studio are unable to connect to the Supabase database. Running npx prisma migrate ......
Read more >Database Connections - Supabase
There are various ways to connect to your Postgres database. ... You cannot manage the database schema via the API (for security reasons)....
Read more >supabase cannot connect to database - Stack Overflow
When I run docker-compose up everything works except I see this error in my logs: supabase-rest | 21/Feb/2022:19:50:29 +0000: {"details":"could ...
Read more >Connecting to a Supabase database - DronaHQ
Studio enables you to connect and build over your Supabase databases. Let us understand how to configure your Supabase Connection.
Read more >I can't connect Supabase DB to neither Zapier or Data Studio
As you read, I couldn't connect Zapier with Postgres integration (it doesn't capture events of new or updated rows) In the same way, ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yeah, I had tried that before and in databases that had tables before but do not any more, I have no problem at all. I thought your description could mean that it is a totally new database that never had content, but again no problem at all.
Ah interesting, thanks for sharing your findings!