79601764

Date: 2025-05-01 11:22:02
Score: 3.5
Natty:
Report link

I have a similar issue with the error message : Cloud SQL connection failed. Please see https://cloud.google.com/sql/docs/mysql/connect-run for additional details: certificate had CN "", expected "<project_id>:<instance_id>"

I have a simple setup where I deploy my Ruby backend API on a Cloud RUN Service using an artifact, and I connect it to a PostgreSQL database on Cloud SQL. I try to connect both through a UNIX socket as it seems to be the correct way to do it (rather than TCP).

In my Cloud Run configuration, I specifically selected the database instance to automatically establish the socket in the background (according to Google Cloud documentation). According to the documentation, I'm not supposed to setup a Cloud Auth Proxy with this setup, however, I can't make it work, the connection always fails.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Me too answer (2.5): I have a similar issue
  • Low reputation (1):
Posted by: user30418711