DB_URL not found when adding sslmode
See original GitHub issueBug description
I received the following error when running prisma migrate deploy
:
Prisma schema loaded from prisma/schema.prisma
Error: Schema Parsing P1012
Get config
error: Environment variable not found: DB_URL.
--> schema.prisma:5
|
4 | provider = "postgresql"
5 | url = env("DB_URL")
|
It happens only when I add sslmode
to the DB_URL
as follows:
postgresql://user:password@host:port/dbName?sslmode=require
It works just fine without adding the sslmode
.
Adding other arguments like connection_limit
works tho.
Environment & setup
- OS: Ubuntu 20.04 (LTS) x64
- Database: PostgreSQL 12
- Node.js version: 10.17.0
- Prisma version:
@prisma/client": "^2.19.0"
"prisma": "^2.19.0"
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
SSL is not enabled on the server - Stack Overflow
sslmode is just added to the db url like a query parameter. Share. Share a link to this answer. Copy link ... This...
Read more >Connecting to Heroku Postgres
By default, Heroku attempts to enable SSL for the PostgreSQL JDBC driver by setting the property sslmode=require globally. If you're building ...
Read more >Fix documentation regarding datasource SSL/TLS certificates ...
It seems to be necessary to edit the YAML parser to get these additional configs and if the config is not 'sslmode: "disable"',...
Read more >Connecting to a PostgreSQL database with Go's database/sql ...
Update your connection string to include sslmode=disable and you should be back in action. pq: role “postgres” does not exist. The terms role...
Read more >34.1. Database Connection Control Functions - PostgreSQL
If set to 1, an SSL connection to the server is required (this is equivalent to sslmode require ). libpq will then refuse...
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
@janpio Hi, sorry for the late reply, haven’t touch the project in a while so I suppose I’ll close this issue! Thank you.
I am still unable to reproduce this with a Digitalocean managed postgres instance. Can you try again with the latest version of Prisma once?