1

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:

  1. Creating Instance and setting password:- gcloud sql users set-password root % --instance [INSTANCE_NAME] --password [PASSWORD]

    1. 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]

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.

Geek Guy
  • 710
  • 1
  • 8
  • 28
  • I think App engine does support X-devapi. Can you elaborate further from which environment you are launching it?, also, what is the error you are getting? – Ggrimaldo Jun 29 '18 at 13:57
  • @Ggrimaldo please see my update – Geek Guy Jun 30 '18 at 15:12
  • Am need to launch it from Ubuntu, there are no documented procedures, any guides or references please? so far it working well locally. – Geek Guy Jul 01 '18 at 12:31
  • What type of SQL instance are you using? I think different instance types do have very different capabilities within Google Cloud SQL. – Ggrimaldo Jul 02 '18 at 08:16
  • Am using second generation – Geek Guy Jul 02 '18 at 21:55
  • [https://stackoverflow.com/questions/51126920/x-devapi-unable-to-connect-to-database-in-google-app-engine] some other issue posted on the link which could guide – Geek Guy Jul 03 '18 at 19:16

1 Answers1

1

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

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

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.

Ggrimaldo
  • 327
  • 1
  • 7
  • Thanks for the step, I have done research on this for more than one week and I was fully convinced that Google doesn't offer it for now. I am currently on a platform that supports it and am in a process of hosting it, I'll give a recommendation/comment tonight based on the outcome, to help other developers. – Geek Guy Jul 06 '18 at 15:57
  • 1
    Kindly remember to up-vote my question, I believe it will help many developers henceforth – Geek Guy Jul 06 '18 at 16:01