简体   繁体   中英

Unable to connect from ecllipse to cloud sql using app engine server and java

I am trying to connect from eclipse to cloud sql using app engine server, In SQL authorization I have added my ip address and given @anyhost access. I am using jdbc socketfactory to connect to cloud sql. But I am getting the below exception

please refer this link (exception screenshot)

Please provide error messages as actual text, not images. This makes searching for anything difficult. You also have your instance connection string in the image. I advise you to remove this.

As for answering your question, without more information I can give you a generalized answer.

When connecting from App Engine, you do not need to whitelist any IPs. Whitelisting IPs doesn't actually work with GAE as the IPs may change for new instances.

GAE instances have the Cloud SQL proxy running and you specify the connection details in your pom.xml.

Which exact connection method you need to use depends on your JAVA version, whether you're using GAE Standard or GAE Flexible, and if you're using a 1st or 2nd generation Cloud SQL instance.

This page provides links to details for all of the different scenarios to connect from GAE to Cloud SQL. For local testing of your app, you will have to have the Cloud SQL proxy running locally. This quickstart shows how to set this up.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM