无法从我的App Engine访问Google Cloud SQL数据库 [英] Cannot access Google Cloud SQL database from my App Engine

查看:101
本文介绍了无法从我的App Engine访问Google Cloud SQL数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

上周,我尝试为NodeJS API和Cloud SQL数据库设置Google Cloud.总体而言,它可以正常运行,但是我无法访问我的Cloud SQL数据库. SQL数据库的授权表明,当前项目中的所有应用程序均被授予访问数据库的权限.不幸的是,这是不正确的.我需要从App Engine授予实例的IP地址.在部署API的新版本后,实例的IP地址会不断变化.

Last week I tried to setup Google Cloud for a NodeJS API and Cloud SQL database. Overall it works fine, but I can't access my Cloud SQL database. The authorization of the SQL database shows that all apps within the current project are granted to access the database. Unfortunality, this is not true. I need to granted the IP addresses of the instances from the App Engine. The IP adressess of the instances constantly changes after I deploy a newer version of the the API.

任何人都有解决方案来获取从App Engine到Cloud SQL数据库的访问权限.添加常量实例IP地址以授予数据库非常烦人.

Does anybody have a solution to get access from the App Engine to the Cloud SQL database. It's very annoying to add constant the instance ip address to grant the database.

此处采样

提前谢谢!

Jelle

推荐答案

我建议为应用引擎分配静态IP,但似乎在App引擎中是不可能的(尽管在计算引擎中是可能的).因此,让我们解决问题的根源,您将无法从App引擎访问cloud sql,确定要遵循以下链接的说明吗?

I was going to suggest to assign a static IP to the app engine, but seems like it's not possible in App engine (it's possible in compute engine though). So lets tackle the root of the problem, you being unable to access cloud sql from App engine, are you sure you followed the instructions of the following link to the letter?

https://cloud.google.com/nodejs/getting -started/using-cloud-sql

如果没有,这可能会解决您的连接问题.

This might solve your connection issue if you haven't.

这篇关于无法从我的App Engine访问Google Cloud SQL数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆