Error connecting to GCP cloud sql using ssl connection
See original GitHub issueGot this error when trying to connect to GCP cloud sql using ssl connection
Error: P1011: Error opening a TLS connection: One or more parameters passed to a function were not valid.
My connection string following postgres connection guide and ssl identity following this issue
DATABASE_URL=postgresql://postgres:password@host:5432/insights?schema=insights-db&sslmode=require&sslcert=server-ca.pem&sslidentity=client-identity.p12&sslpassword=myidentitypassword
This error come out on both version “2.0.0-preview018.2” & “2.0.0-preview019”
Issue Analytics
- State:
- Created 4 years ago
- Comments:13 (5 by maintainers)
Top Results From Across the Web
Configure SSL/TLS certificates | Cloud SQL for MySQL
This page describes how to configure an instance to use SSL/TLS. ... SQL uses self-managed SSL/TLS certificates to securely connect to Cloud SQL...
Read more >Unable to connect to CloudSQL instance using IP address if ...
1. Go to the "Access Control" page for the CloudSQL instance in the management UI. · 2. Check "Only allow SSL connections" on...
Read more >Trouble Connecting To Postgres (Google Cloud SQL) with SSL
Failed to establish connection. Error: The remote certificate is invalid according to the validation procedure. I do have an active server SSL cert....
Read more >Enable SSL/TLS for Cloud SQL Incoming Connections
Enforce all incoming connections to your Cloud SQL database instances to use SSL/TLS only. If the SSL/TLS protocol is not enforced for all ......
Read more >How to connect to Google Cloud SQL with enforced SSL from ...
The easiest way to work around this problem is to write the cert file yourself into /tmp - this is a ramdisk in...
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 Free
Top 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
Hi, @pantharshit00 I confirm that I’m still facing this issue using prisma v2.6.2
I have just repeated the steps
created new server and client certificates at GCP console
openssl pkcs12 -export -out client-identity.p12 -inkey client-key.pem -in client-cert.pem
set database url to
mysql://USER:PASSWORD@HOST:PORT/DATABASE?sslidentity=client-identity.p12&sslpassword=mypassword&sslcert=rootca.cert
as described at https://www.prisma.io/docs/reference/database-connectors/mysqlnpx prisma migrate save --experimental
And got the error Error: P1001: Can’t reach database server at
x.x.x.x
:3306
Hey all,
Can you please try rotating your certificate once? There was a similar issue which suggested this as a solution from the GCP docs: https://github.com/prisma/prisma/issues/4282#issuecomment-757477820