Hi fellows, I was able to successfully run a simple CRUD App connected to a mySQL DB hosted on Google Cloud. To be able to connect to the DB I had to define the IP address of my workstation as an "Authorized Network" in the DB Connection Configuration.
Now I want to be able to be able to connect from "any network" (a LC app running on a mobile) and in order to do so (according to the Google Cloud documentation) I had to use a Proxy which seems a rather complicated (for me) process and therefore I wonder if any of the experienced developers in the forum has done this and is willing to share the recipe...or at least give some hints (besides the GC documentation)
Many thanks in advance
Accessing a Google Cloud mySQL DB
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Posts: 641
- Joined: Tue Jul 29, 2014 12:52 am
- Location: Brazil
Accessing a Google Cloud mySQL DB
Simon
________________________________________
To ";" or not to ";" that is the question
________________________________________
To ";" or not to ";" that is the question
-
- VIP Livecode Opensource Backer
- Posts: 9833
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: Accessing a Google Cloud mySQL DB
Do they offer a REST API?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
-
- Posts: 641
- Joined: Tue Jul 29, 2014 12:52 am
- Location: Brazil
Re: Accessing a Google Cloud mySQL DB
Hi Richard, thanks for jumping in. Could you please tell what is your idea?
I'm not sure if there is such option but in searching for the answer to your question I found this article "Authenticating users with PHP" (https://cloud.google.com/php/getting-st ... cate-users) which I guess points out in the same direction. I will explore this option further because it seems very interesting (even though it is billable...)
EDITED: it seems this solution wouldn't work a LC mobile app because according to Google Documentation
I'm not sure if there is such option but in searching for the answer to your question I found this article "Authenticating users with PHP" (https://cloud.google.com/php/getting-st ... cate-users) which I guess points out in the same direction. I will explore this option further because it seems very interesting (even though it is billable...)
EDITED: it seems this solution wouldn't work a LC mobile app because according to Google Documentation
So I'm back to the starting pointHowever, this can only be used for computing services that support Cloud IAP, such as App Engine and load balancers. You cannot use Cloud IAP on a local development machine.
Simon
________________________________________
To ";" or not to ";" that is the question
________________________________________
To ";" or not to ";" that is the question
-
- VIP Livecode Opensource Backer
- Posts: 9833
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: Accessing a Google Cloud mySQL DB
It's very rare that we'd want to expose the full power of MySQL to the open Internet. More commonly, the DB is protected from the Internet by an API accessed over HTTP, often using REST style. Depending on the cloud service, an API may be provided. Or they may expect you to provide your own, which would be written in PHP, Python, Perl, or just about any other general purpose scripting language commonly used on the web - even LiveCode Server.
This would explain why they require entering specific IP addresses to be able to touch the DB. Those are assumed to be administrators.
So the question is: What interface does Google provide for public access to its MySQL containers? If not HTTP-based, what is it?
This would explain why they require entering specific IP addresses to be able to touch the DB. Those are assumed to be administrators.
So the question is: What interface does Google provide for public access to its MySQL containers? If not HTTP-based, what is it?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
-
- Posts: 641
- Joined: Tue Jul 29, 2014 12:52 am
- Location: Brazil
Re: Accessing a Google Cloud mySQL DB
Hi Richard, in this article https://cloud.google.com/sql/docs/mysql ... on-methods all the options are explained.
All of them are too complicated for me, and I guess are very complicated as well to any "normal" LC developer trying to get the most out of the easy of use and power of LC together with a standard SQL DB.
In my case using LC Hosting is not a good option (beside the extra $$$) because as there is no Data Server in my region (Brazil) I'm afraid performance will be impacted. That's why I was thinking on Google Cloud because they do have a huge Data Server locally.
Still looking for alternatives...
Many thanks for taking your time to answer
All of them are too complicated for me, and I guess are very complicated as well to any "normal" LC developer trying to get the most out of the easy of use and power of LC together with a standard SQL DB.
In my case using LC Hosting is not a good option (beside the extra $$$) because as there is no Data Server in my region (Brazil) I'm afraid performance will be impacted. That's why I was thinking on Google Cloud because they do have a huge Data Server locally.
Still looking for alternatives...
Many thanks for taking your time to answer
Simon
________________________________________
To ";" or not to ";" that is the question
________________________________________
To ";" or not to ";" that is the question