Connect MySQL and App Engine Flexible service in different GCP projects using peering

Hi @Hybos ,

Welcome to Google Cloud Community!

Another way to securely connect App Engine to Cloud SQL across different projects is to use the Cloud SQL Auth Proxy. This proxy handles authentication and encryption while bypassing the limitations of VPC peering.

  • Grant IAM Permissions in Project A - Ensure the App Engine service account from Project B has the Cloud SQL Client role(role=roles/cloudsql.client) in Project A.
  • Update App Engine Configuration in Project B - Modify app.yaml to specify the Cloud SQL instance connection.
  • Modify Database Connection to Use Cloud SQL Auth Proxy - Instead of connecting to the private IP, update your database settings to use the proxy.

Nonetheless, your case appears to be in need of a deep dive investigation. I highly recommend that you reach out to our 1:1 support for this issue. Please see our Cloud Customer Care documentation.

Was this helpful? If so, please accept this answer as “Solution”. If you need additional assistance, reply here within 2 business days and I’ll be happy to help.

1 Like