简体   繁体   English

无法使用App Engine服务器和Java从Ecllipse连接到Cloud SQL

[英]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. 我正在尝试使用App Engine服务器从Eclipse连接到Cloud sql,在SQL授权中,我添加了我的IP地址并给予了@anyhost访问权限。 I am using jdbc socketfactory to connect to cloud sql. 我正在使用jdbc socketfactory连接到云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. 从App Engine连接时,您无需将任何IP列入白名单。 Whitelisting IPs doesn't actually work with GAE as the IPs may change for new instances. IP列入白名单实际上不适用于GAE,因为IP可能会因新实例而改变。

GAE instances have the Cloud SQL proxy running and you specify the connection details in your pom.xml. GAE实例正在运行Cloud SQL代理,您可以在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. 您需要使用哪种确切的连接方法取决于您的JAVA版本,使用的是GAE Standard还是GAE Flexible,以及使用的是第一代还是第二代Cloud SQL实例。

This page provides links to details for all of the different scenarios to connect from GAE to Cloud SQL. 该页面提供了链接, 这些链接提供了从GAE连接到Cloud SQL的所有不同方案的详细信息。 For local testing of your app, you will have to have the Cloud SQL proxy running locally. 为了对应用程序进行本地测试,您将必须在本地运行Cloud SQL代理。 This quickstart shows how to set this up. 本快速入门介绍了如何进行设置。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在Eclipse中进行开发时无法从Google App Engine连接到Google Cloud SQL实例 - Unable to connect to Google Cloud SQL instance from Google App Engine when developing in Eclipse Google APP Engine 和云 sql :: 无法在 Google 云 sql(我的 sql)中连接 Spring boot 应用程序 - Google APP Engine and cloud sql :: Unable to connect Spring boot app in Google cloud sql (my sql) App Engine Java Servlet无法连接到Cloud SQL - App Engine Java Servlet does not connect to Cloud SQL Google Cloud Memorystore通过“ App Engine Java标准环境”进行连接 - Google Cloud Memorystore connect from “App Engine Java Standard Environment” 无法使用Java 8连接到SQL Server - Unable to connect to sql server using java 8 无法使用java编程连接SQL Server - Unable to connect the SQL server using java programming 使用Google App Engine端点连接到Cloud SQL - Connect to Cloud SQL with Google App Engine Endpoint 无法使用 JAVA 连接到 MS SQL 服务器 - Unable To Connect To MS SQL Server Using JAVA 从Google App Engine连接到Java服务器套接字 - Connect to Java server socket from google app engine 无法从Google App Engine(春​​季启动应用)连接到Google Cloud SQL(第二代) - Can not connect to google cloud sql(second generation) from google app engine(spring boot app)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM