How can I use MySQL with Google App Engine? - google-app-engine

In my application I want to use MySQL with Google App Engine. I tried to search for solutions but didn't find an accurate answer. Some say its impossible to connect to MySQL, some say that Google Cloud SQL is one of the options.
Does anyone have ideas about the correct approach?

The capability to use MySQL within Google App Engine does exist via Google Cloud SQL. It works with both the Python and Java runtimes.
However, Google Cloud SQL is currently in limited preview. You can see details on how to enroll here.
While you wait to see if you get accepted into the preview, you can check out the instructions for Java and Python.

Related

Google App Engine Access Cloud Datastore from Different Project

I have been trying to find a solution to accessing a datastore in one project from a different google app engine project. I went through the tutorial on accessing a datastore from a different project's compute engine, however, this is not what I am looking for. What is required here is accessing a datastore on one project from a different app engine project. Has anyone done this successfully? Any ideas?
Cheers
As #Patrice says, this is possible by using the Remote API for Java (or for Python), which lets you access different App Engine services from any other application, as stated in the documentation.
For a more specific information on how to access the Datastore remotely with the Remote API, please take a look at this article from the documentation that explains step by step all the procedure.
Please, take into account that if your Google account is configured to use 2-Step Verification, you will need an App Password that authorizes the app to access your account resources.
there is actually an API that lets you make calls to App Engine services from anywhere, even from another App, as long as the credentials are ok, it's called the "remote API"

php with google app engine or amazon-ec2

What is better to code with php in google app engine or in amazon-ec2.
I think it is better in amazon-ec2 because they support datastore with php and google app engine doesn't, what do you think ?
While its not possible to access the appengine datastore, google has a new preview service for "cloud datastore", google "cloud datastore from php" and you will see how to use it.
You really cant compare AWS with appengine as one requires managing servers and scalability manually and their noSQL solution (dynamoDB) is a joke compared to google's datastore, for example in dynamoDB you must provision your writes beforehand and even if you are all day changing provisioning, it takes sometimes hours to propagate the new setting.
I had never use Google App Engine, but several times AWS systems, and sure, as AWS EC2 could be used as Linux Server Instance, I recommend you that provider. And coz' it seems that you use PHP, they have strong API for this langage. Have fun with AWS.

Can I use a free cloud database on Google App Engine?

I built a simple Web Application using GWT and deployed it to Google App Engine Now I want to build my database and integrate it to my website I searched for it all what I found is Google Cloud SQL
and I have to pay for it
any free solution.I just want to build simple project for 1 user use
*Tip: database using MYSQL
There is only one way to have a free solution:
You will need to have to learn Google App Engine Datastore. This is another alternative to using a database such as MySQL.
There is now an introductory free trial for Google Cloud SQL.
https://developers.google.com/cloud-sql/docs/billing

Any one tried MongoDB on Google App Engine?

I'm trying to deploy one of my java apps in GAE and I have used MongoDB. Unfortunately GAE doesn't allow me to create databases, however it suggests using Google Datastore. Are there any plugins or add-ons to use MongoDB.
You can't run MongoDB on GAE. You need to use the Google datastore.
Matt is right. If you want to deploy to Google's servers you can't use Mongo. If you are interesting in running your own server(s), check out AppScale.
If you really want to use MongoDB anyway, you'll have to find a third-party host that provides a REST interface through which you can make your transactions. I've personally tried and recommend MongoLab on App Engine. Then, in your code, use an HttpUrlConnection object to send/receive requests if you're doing it with Java.
I think you could deploy your app on app engine and create a separate vm instance in google compute engine that would have mongo installed, then you plug your GAE app on that vm for the db connection. This would allow you to keep all your app in the google cloud. See https://cloud.google.com/solutions/mongodb/ and http://docs.mongodb.org/ecosystem/platforms/google-compute-engine/
A lot of things have changed since this question has been asked, as of June 2021, you can use MongoDB Atlas with Google App Engine Standard running on Java 8 environment. I built my App with the Ktor framework that runs on App Engine and interacts with databases on MongoDB Atlas.
if you're still looking for an answer to this you might want to check this project that did exactly the same but in reverse, it will surely help you out with what you want to do.
http://code.google.com/appengine/articles/django-nonrel.html
you can use mongo, only if have something like on mongolab then use pymongo to connect and most important thing you need to enable socket api from gae dashboard.
it worked for me thanks

Hosting/transferring a web site on Google App Engine

I have my website currently hosted on paid server, but i want to transfer it on GAE.
How can i do it? Can anyone please help me in this case.I'd appreciate your help.
Thanks:)
1) First you will have to adapt your website to the GAE framework (python with django or the new Java environment). You can test your work by downloading the SDK of GAE which offer a local server.
2) Then create an account on appengine.google.com and upload your application on something.appspot.com, test it.
3) If you have a domain name, create a google apps account on this domain, and finally bind this domain with your GAE website. Here is the Google doc.
If it is just a static website which does not need server side scripts or a database, then you might want to look into Google Sites instead of Appengine. You can find out more about Sites here: http://www.google.com/sites/help/intl/en/overview.html
If you do have some server side logic going on, you will need to convert it to either python or java and convert your relational database to Google's Data API which does not support the SQL your current database uses. You can read more about the APIs and what is supported with the Data API and tutorials at: http://code.google.com/appengine/
In response to sanorita's comment "Actually, it's generated html and not plain html. and google appengine is for static data... right?":
AppEngine can host static data, but that is far from its intent.
The purpose of AppEngine is to allow developers to easily deploy their dynamic applications on Google's infrastructure. In the end, assuming you have programmed your app in effective ways to handle scaling (basically just noting that writes to the database are expensive, and contention is the root of all evil) you can handle nearly any amount of traffic.

Resources