1
votes

I have built a test project on GCP.

I had a machine with external IP, google cloud SQL instance and I was able to connect between the two easily.

Then I've added a load balancer. I also opened ports to allow traffic from the compute engine to cloud SQL and also ensured I have whitelisted the traffic on the cloud SQL for the load balancer public IP.

However, I am no longer able to connect from the compute engine to the MySQL instance.

firewall

SQL whitelist

I have a feeling this is related to firewall after adding an LB, but I am unsure.

1
This isn't clear. Is the loadbalancer in front of the Cloud SQL? Generally, I would assume the load balancer is in front of web server, with the web server's connection to Cloud SQL unchanged. Perhaps you could lay out the before and after a bit more?zanerock

1 Answers

0
votes

thank you for responding! I was actually able to fix the issue. It seems that I accidentally entered the wrong compute engine IP in the Cloud SQL white list allowed connection section. Thank you.