如何将oracle的x-devapi添加到Google App Engine中托管的Node js服务器 [英] How to add oracle's x-devapi to node js server hosted in Google app engine

查看:39
本文介绍了如何将oracle的x-devapi添加到Google App Engine中托管的Node js服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在计算机上使用x-devapi在本地对我的应用进行编码,最近5个小时,我尝试了可能的工作方法将其托管在Google app-engine上,但未成功.我只能按照其文档中的说明连接到Google App引擎的MySQL数据库.但是我想使用X-devApi. Google应用程序引擎是否支持Oracle的X-devApi?我该如何实现?

I have been coding my app with x-devapi locally on my computer and for the last 5 hours, I have tried possible workorounds to host it on Google app-engine but unsuccessful. I am only able to connect to Google App engine's MySQL database as illustrated in their documentation. However I want to use the X-devApi. Does Google app-engine support Oracle's X-devApi? how can I achieve this?

更新:

根据X-devApi文档,当在数据库中启用X-devAPI时,将发生数据库连接.这就是我在本地启用它的方式:

According to the X-devApi documentation, the database connection happens when the X-devAPI is enabled in the database. This is how I enable it locally :

sudo mysqlsh -u root -h 127.0.0.1 --mysql --dba enableXProtocol

第二,例如,必须使用命令\py指定用于python的语言.我在服务器上使用Nodejs,并且在如何在控制台上启用X-devApi方面进行了大量研究,但没有找到任何文档.

Secondly, the language have to be specified with command e.g \py for python, for example. I use Nodejs for my server and I have researched alot on how to enable the X-devApi on the console but I have not found any documentations.

这是我在本地连接的方式

Here is How I connect locally,

var mysqlx = require('mysqlx');
 
// Connect to server on localhost
var mySession = mysqlx.getSession("mysqlx://user:password@localhost:33060")
 
var myDb = mySession.getSchema('test');

尽管Google Cloud具有三个过程:

While google cloud has three procedures:

  1. 创建实例并设置密码:-gcloud sql users set-password root % --instance [INSTANCE_NAME] --password [PASSWORD]

  1. 分别设置Cloud SQL实例和创建数据库:-gcloud sql users create [USER_NAME] [HOST] --instance=[INSTANCE_NAME] --password=[PASSWORD]gcloud sql databases create [DATABASE_NAME] --instance=[INSTANCE_NAME]

难点: 如何以及在什么时候启用X-devApi,它是在实例级别还是在用户级别?如果可能,请帮助执行此过程.

Point of difficulty: How, and at which point do I enable the X-devApi, is it at instance or user level? if possible, please help with this procedure.

推荐答案

到目前为止,我一直在研究Google Cloud SQL实例与X协议不兼容,这对于X-devAPI完全必要.

So far I've been investigating the Google Cloud SQL instances are not compatible with X protocol, which is completely necessary for X-devAPI.

因此,目前尚无法在Cloud SQL中使用上述工具.

Therefore, currently there is no way to use said tool with Cloud SQL.

Google的公共发行跟踪器中有一个正在进行的功能请求.如果这对您来说非常重要,请考虑将其标记为收藏",这样您就可以收到有关其更新的通知,它将为功能请求提供更高的优先级.

There is an ongoing feature request in the public issue tracker of Google. If it is very important for you, please consider marking it as favorite so you can receive notifications of their updates, and it will give the feature request better priority.

这篇关于如何将oracle的x-devapi添加到Google App Engine中托管的Node js服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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