Search This Blog

Tuesday, November 22, 2022

Unable to Connect to Google Cloud SQL

 You've just created a MySQL on Google Cloud. However, was not able to access it via MySQL Workbench.


Tried to enable Private IP and use VPC and Public IP, but still failed.

Workaround is

1. Go to Connections > Networking > Public IP

2. Add Network | Put a name

3. Put CIDR of your public network. Example: 34.124.242.59.

Enter:

34.124.242.0/24


4. Save

5. Try accessing again using MySQL Workbench.

Another trick.

1. Go to Connection > Security

2. Check Allow only SSL Connection

Wait for changes to apply

3. Set again root password

Wait for changes to apply

4. Uncheck Allow only SSL Connection

Wait for changes to apply


5. Test access again