I use Prisma with Cloud Run & Cloud SQL. After providing DATABASE_URL to the prisma.schema it throws me an error in runtime.
Can't reach database server at `(/cloudsql/project-name:us-east1:database-id)`:`5432`
Please make sure your database server is running at `(/cloudsql/project-name:us-east1:database-id)`:`5432`."
- Database: Postgres
- Provided url
DATABASE_URL:postgresql://username:password@localhost/databasename?host=(/cloudsql/project-name:us-east1:database-id)
What is wrong with connection? Do I failed to construct DATABASE_URL correctly?
hostparameter in the connection URL. I posted my solution as an answer to the question.