将AppMaker连接到Google SQL [英] Connect AppMaker to Google SQL

查看:61
本文介绍了将AppMaker连接到Google SQL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试将AppMaker连接到现有的Google SQL数据库失败.在Google Cloud中,我创建了第二代实例(europe-west1),并允许每个IP(用于测试).接下来,我创建了一个用户,将Workbench与数据库连接,并创建了一个架构.没有问题. 在AppMaker中,我使用以下地址连接到数据库:

I tried to connect AppMaker to an existing Google SQL database without success. In Google Cloud, I created a second generation instance (europe-west1) and allow every IP (for the test). Next, I created a user, connected Workbench with the database and created a schema. Without problems. In AppMaker I use the following address to connect to the database:

[域名:] myprojectID:regionName:myinstanceID/mydatabase (有域和无域)

[domainName:]myprojectID:regionName:myinstanceID/mydatabase (with and without domain)

反馈:

无法连接到Google Cloud SQL实例. Google Cloud SQL地址可能不正确,或者此App Maker编辑器可能没有访问数据库的权限.您可以在我们的文档中找到有关使用Google Cloud SQL的更多信息.

Unable to connect to Google Cloud SQL instance. The Google Cloud SQL address may be incorrect or this App Maker editor may not have permission to access the database. You can find more information about using Google Cloud SQL in our documentation.

如何使用AppMaker连接到Google SQL?

How can I connect to Google SQL with AppMaker?

谢谢.

推荐答案

我连接数据库的过程如下:

The process I followed to connect to the database is the following:

  1. 按照步骤 此处创建第二代实例 (请确保仅针对创建Cloud SQL实例"执行步骤,然后在该实例中创建数据库)
  2. 现在,转到 IAM&项目的ADMIN 部分.单击顶部的蓝色 添加" 成员选项.在" 成员 "字段中,从" appmaker-maestro@appspot.gserviceaccount.com "中输入" 角色 "下拉列表中选择 Project-> Editor
  3. 返回第二代SQL实例,并复制实例的 实例连接名称 属性的值.示例:
  4. 遵循在此处找到的第二代步骤进行连接从AppMaker中,并在要求提供实例地址时,键入您在上一步中复制的值,并在其末尾添加/您的数据库.例如: my-foto-app:us-central1:myinstance/userphotodatabase
  5. 现在应要求您输入用户名和密码.这样做,您就完成了.
  1. Create a second generation instance by following the steps here (Please make sure to follow the steps only for "Create a Cloud SQL instance" and then create a database inside that instance)
  2. Now, go to the IAM & ADMIN section of your project. Click on the blue "add" member option on the top. Type "appmaker-maestro@appspot.gserviceaccount.com" on the "Members" field and from the "Roles" dropdown select Project->Editor
  3. Return to your second generation SQL instance and copy the value of the Instance connection name property of your instance. Example:
  4. Follow the steps for second generation found here to connect to the database from AppMaker and when asked for the instance address, type the value you copied on the previous step and add /yourdatabase at the end of it. For example: my-foto-app:us-central1:myinstance/userphotodatabase
  5. You should now be asked to enter the user and password. Do so and you are finished.

请注意,我尚未在欧洲位置上进行过测试,仅在美国中部位置上进行过测试.希望这对您有所帮助!

Please note that I haven't tested out this with a europe location but only on a us central location. I hope this helps and works!

这篇关于将AppMaker连接到Google SQL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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