0
votes

I'm trying to establish a basic mysql connection from a google compute engine instance in one project to a google cloud sql instance (2nd generation) in a different project.

I've done this many times before without any problem. You simply add the ip address of the google compute instance to the list of authorized networks for the google cloud sql instance. This has always worked in the past but it is not working now.

The only thing that I can think of which is different about this situation is that I've recently been experimenting with using the cloudsql-proxy to establish a connection from a different gce instance to the same google cloud sql instance. Could this be the problem? Perhaps the google cloud sql instance is getting confused by having to support both connection mechanisms?

I just need the connection to work. Is there a work-around?

1

1 Answers

0
votes

There isn't a problem using both modes of connectivity simultaneously.

The only thing I can think of is that you are accidentally using an ephemeral IP addresses for your VMs instead of static, which means the VM may have a different IP address than you expect (after a restart, for example).

If that's not the case, please send a mail to [email protected] with a little bit more information (project and database name, project/name/ip of your VM) so that we can figure out what's going on in the backend.