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?
UPDATE:
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
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');
While google cloud has three procedures:
Creating Instance and setting password:-
gcloud sql users set-password root % --instance [INSTANCE_NAME] --password [PASSWORD]
- Setting up the Cloud SQL instance and creating database respectively:-
gcloud sql users create [USER_NAME] [HOST] --instance=[INSTANCE_NAME] --password=[PASSWORD]
,gcloud sql databases create [DATABASE_NAME] --instance=[INSTANCE_NAME]
- Setting up the Cloud SQL instance and creating database respectively:-
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.