Reputation: 1
i made a java application that anybody can use it from different location, i want to every user to have the access to the database in the cloud sql , my question is how can i access to the database without a need for Authorized networks
Upvotes: 0
Views: 183
Reputation: 81356
Security Warning: Do not allow the Internet to access Cloud SQL.
Your question states without a need for Authorized networks. If that is a requirement, then you must implement a server to proxy requests for Cloud SQL. That server will need to use the Cloud SQL Auth Proxy or have access via private IP.
About the Cloud SQL Auth proxy
To allow public Internet access, use the address range 0.0.0.0/0. This means adding that value as an authorized network.
Authorizing with authorized networks
You can also use the CLI:
gcloud sql instances patch INSTANCE --authorized-networks=0.0.0.0/0
Upvotes: 2