Database on Cloud - mysql

BACKGROUND-
I am planning to make a website that will accept data from users to store them in a database(MySQL).The website would be served from google cloud servers.I have installed MAMP on my mac for web development.
PROBLEM-
Google cloud services also provide Cloud SQL.Now I have a few doubts-
1)Once I finish designing my website on MAMP and want to deploy it on cloud servers I would have database settings of my local machine.Does this mean that before putting it on cloud and in order to use Cloud SQL as database I would have to change code on back-end side that specifies database settings?If yes then how tedious is it to do so?(Changing database from testing environment from MySQL to deployment environment Cloud SQL).
2)Also is there a way to use cloud and not use Cloud SQL?
3)What else combination can be chosen with database to deploy website on cloud?

Usually changing the database needs huge efforts(testing and some config changes) as all the databases provide many additional features which doesn't work directly on another database.
You can use Cloud(Cloud SQL is just part of it).
But the Cloud SQL is mysql only as per the information given on the below link by google
https://cloud.google.com/products/
So, it should not be a big deal for you to migrate the project to cloud from your local system. Only you have to configure the connection details(it will not be simply localhost).

Related

How to connect from Flexible Environment to Second Generation Cloud SQL instance?

I have deployed my web server which requires a MySQL database for storage. I've created a Second Generation MySQL instance with one failover replica but I am not sure how I can connect to those.
I am not sure how to configure these instances and what I have to consider here e.g. region/zone. Flexible Environment appears to be unavailable in Europe unfortunately - at the moment at least - so I guess I'll have to place the SQL instances in the US too.
Will those instances have to be in the same local network or can they communicate over regions? Will I even be able to control this or will all this be decided by Google Cloud?
Could anybody who has done this before give me a few details about what to do here?
For best performance, you should place your App Engine instances in the same region.
For information on how to connect from your application to the Cloud SQL MySQL instance see the following documentation: https://cloud.google.com/sql/docs/dev-access#gaev2-csqlv2
The short summary is that you have to modify your app.yaml file to list the Cloud SQL instances you will be connecting to. Once that's done, a local socket will appear inside the App Engine VM that will allow you to connect to your Cloud SQL instance.

microsoft access database - cloud options

I have a microsoft access database that I use to track client specifications. I would like store the front-end and back-end database in the cloud and use it in real time. What recommendations and cheap options are available
One option is to host the frontend and backend on an AWS t2.small instance running Windows:
AWS instance
Then access this via Remote Desktop as any other machine.
There is an option to use your Access database locally and update the data on the cloud, using Google Drive or other similar services to share this among several users, it is an asynchronous solution though.
deployment of a multi user Access app, among geographically separated users, is via Remote Desktop Server, aka citrix, aka terminal services...
in any multi user deployment the app is split, and each user has their own front end file - and all connect to the one single back end file. this remains true in an RDS deployment.
this is a main stream method to deploy, and very functional....lots of orgs do virtual desktop now, and then there are hosting companies that will do a single app... whether or not one views this as "cheap" however is in the eye of the beholder... but any other attempt/method is generally a kludge and is typically round-robin where only 1 user at a time can use the app... also - - one does not put the WAN in the middle... both the front and back end files are RDS and so the user simply has Win10 and does not need any Access or Office license on their local pc.

How do I sync 2 MySQL databases?

I written a program to work with a MySQL database that powers my website and I have recently bought some reseller hosting however the hosting company has restricted external access on the shared server, so I was going to setup an external mySQL database on another server that can be accessed remotely, however to do this I need a PHP file on my reseller server that can connect to the local database and the remote database and sync them on request from the application via a url.
Does anyone know the best method achieve this?
Try using SQLyog's Database synchronization tool

How to write to a remote DB from an android app

We have an android app that currently sends data to a php script which writes to a mysql DB on the same server. We are thinking of using a scalable DB server e.g. FathomDB (which is just based on amazon RDS & rackspace) so that we can handle load increases easily.
The question is how does our android app write to these remote DBs? Do they have some kind of rest API, or allow you to have a php script similar to the one we have in place at the moment?
I'd say most of services like these have a connector running on the web, like the one you are using. But some of the services you mention (for example amazon rds) have a native mysql connection. So you can connect using mysql to the server and run queries like you currently do in php. You can use ACL to ensure security in your application :)

App Engine and MySQL

I just wanted to ask if we can access an external MySQL server from Google App Engine...
The only way to communicate with other hosts is by using UrlFetch that only provides HTTP and HTTPS requests.
So, you can't do it out of the box.
Anyway, if you really need to access an external MySQL server database, you should consider to expose it through a Web API (RESTful, Soap web-services for example).
In this way your data would be available also via UrlFetch.
I am still in the learning phase of all this, but I am fairly certain you can do this now a few ways:
Link Apps Scripts to App Engine and use the JDBC
Link it to Google
Cloud SQL Store your SQL database on Google Cloud Store
Connect Apps Scripts via spreadsheet scripting
"Google Apps Script has the ability to make connections to databases via JDBC with the Jdbc Service. The current support extends to MySQL, Microsoft SQL Server and Oracle. Apps Script makes it easy to connect to databases hosted on Google Cloud SQL, but also works with other cloud hosting platforms and even local databases." https://developers.google.com/apps-script/jdbc
(edited for structure)
It is still not possible to native connect GAE to an external MySQL server the only exception is Googles Cloud SQL. We are using it in our production environment and like the experience. Stable and the performance is good.
GAEs own database scales well and we are using it in most situations, but in cases where we need to ask more complex questions or need aggregate functions, we use Googles Cloud SQl.
These answers are a bit outdated. Google App Engine instances can connect to external database servers.
The ability to connect externally requires that the account the App Engine is running under be a "paid account" a/k/a "billing enabled".
References:
-https://cloud.google.com/appengine/docs/php/using-third-party-databases
-https://cloud.google.com/appengine/docs/php/runtime#PHP_Functions_that_requires_billing_enabled