Connecting to Cloud SQL
Because Cloud SQL is just a managed MySQL or PostgreSQL instance, it can be connected to using any standard MySQL/PostgreSQL client. By default, all external IP addresses are blocked from reaching your Cloud SQL instance. Connections can be established in one of two ways: using traditional IP whitelisting or via the Cloud SQL Proxy.
In most cases, the Cloud SQL Proxy is the preferable solution. With the exception of App Engine standard applications, all other platforms integrate with Cloud SQL in one of these two ways.
Authorized networks
In order to permit access from external systems, Cloud SQL provides authorized networks, which specify whitelisted IP ranges in CIDR notation. For example, in order to authorize connections from all addresses, an authorized network could be added with an address range of 0.0.0.0/0
. Authorized networks can be configured from within the Cloud Console SQL dashboard by clicking on your instance, navigating to the AUTHORIZATION
tab, and...