[英]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 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.