Use Private Cloud SQL IP with Cloud SQL - MySQL connector

Hello,

I have a setup with a Cloud SQL MySql server that is connected to a shared VPC. The Sql server has no public IP. In the same project I have a serverless VPC access configured that connects to the same Shared VPC.

I created a Cloud SQL connector using a service account that has the Sql Editor role. The connector fails to initialize. The error message given is "The connection has been closed.".

When I enable a public IP on my Sql Instance (without any other modification) the connector becomes active.

Is the use of private IPs through shared VPC a supported feature of this connector?

Regards

Philippe

Solved Solved
0 7 947
1 ACCEPTED SOLUTION

Currently this is the only feasible solution and we are working on enhancements in roadmap to avoid Socks5 proxy. Documentation below would help for PSC configuration.

https://cloud.google.com/integration-connectors/docs/configure-psc

We are yet to publish  CloudSQL specific documentation.But additional step would be  to setup Socks5 proxy and expose it as service attachment which can be used while creating connection

View solution in original post

7 REPLIES 7

Former Community Member
Not applicable

Connecting to CloudSQL through private IPs are supported. For this you will have to setup a sock5 proxy and expose that through a service attachment, like here: 

srinandans_0-1679685587533.png

We are working on creating detailed steps for this setup. I will update here once those steps are published.

 

Hello,

 

Sorry was a little busy over the last weeks and din't find to respond to your reply.

Is what you proposed the only solution? It seems a little complicated to achieve the expected goal.

Regards

Currently this is the only feasible solution and we are working on enhancements in roadmap to avoid Socks5 proxy. Documentation below would help for PSC configuration.

https://cloud.google.com/integration-connectors/docs/configure-psc

We are yet to publish  CloudSQL specific documentation.But additional step would be  to setup Socks5 proxy and expose it as service attachment which can be used while creating connection

¿Ya hay información publicada para cloudsql?


@Madhuvandhini How can I communicate between the cloud sql of a project and a cloud run in another project, is this valid solution that you mention?

@NaveenV1 It is a communication between two different gcp projects, the cloud run is in project A and the cloud sql is in project B. What it tells me does not cover what I indicate