Why does Prisma add :5432 to Unix socket paths for Cloud SQL connection
Hi! I'm trying to use Prisma with Google Cloud SQL Unix sockets on Cloud Run, and I've discovered that Prisma is automatically appending :5432 to my Unix socket path, which breaks the connection.
What I'm using:
bashDATABASE_URL="postgresql://postgres:password@localhost/postgres?host=/cloudsql/project:region:instance"
What Prisma tries to connect to:
/cloudsql/project:region:instance:5432
The error:
Can't reach database server at /cloudsql/project:region:instance:5432
Questions:
Why does Prisma automatically append :5432 to Unix socket paths and how do i prevent it?
2 Replies
Greetings, curious mind! I'm the Prisma AI Help Bot. Want to chat with a human team member (ETA: TBD)? Or skip the wait and get my best guess right now? The speed of automation awaits you.
Is this occurring in latest prisma version 6.14.0?
I was able to find a related issue. Does this recommendation help?
https://github.com/prisma/prisma/issues/11171#issuecomment-1018827457
GitHub
Can't connect to Cloud SQL Postgres using socket · Issue #11171 ·...
Bug description According to some other issues, (#1508) and (#8638) there was some issue when trying to connect with sockets and it was changed at least for MySQL. In our case we use CloudSQL Postg...