Prisma client must use SSL or TLS error

Error querying the database: Server error: `ERROR HY000 (1105): unknown error: Code: UNAVAILABLE\nserver does not allow insecure connections, client must use SSL/TLS
Error querying the database: Server error: `ERROR HY000 (1105): unknown error: Code: UNAVAILABLE\nserver does not allow insecure connections, client must use SSL/TLS
It works if I use pscale connect and open a port on localhost, but it gives me that error when I use the
DATABASE_URL='mysql://***************:************@us-west.connect.psdb.cloud/example?ssl={"rejectUnauthorized":true}'
DATABASE_URL='mysql://***************:************@us-west.connect.psdb.cloud/example?ssl={"rejectUnauthorized":true}'
4 Replies
Leonidas
Leonidas3y ago
I fixed this issue by installing OpenSSL on my machine (in my docker image to be precise) On localhost Prisma does not require ssl, but for accessing your database trough http it does (good design decision!)
Leonidas
Leonidas3y ago
Prisma
PostgreSQL database connector (Reference)
This page explains how Prisma can connect to a PostgreSQL database using the PostgreSQL database connector.
Leonidas
Leonidas3y ago
As always the primary information source (the official documentation of a tool) should be preferred to a strangers recommendations☝🏼
amanuel
amanuelOP3y ago
I am using Vercel though I figured it out: You have to use ?sslaccept=strict if you are using prisma!
Want results from more Discord servers?
Add your server