AppML using Google Cloud SQL

Google Cloud SQL is a database cloud service.

It is anything but difficult to set up and manage.

It is FREE to try!

What is Google Cloud SQL

Google Cloud SQL is a cloud based database service.

Why use Google Cloud SQL?

Google Cloud SQL offers MySQL databases conveyed in the cloud without a fuss.

Google offers amazing databases that run quick, and adaptable charging (pay per use).

Google oversees robotized reinforcements, fixing, and recovery.

Getting Started

Before you can begin utilizing Google Cloud SQL, you need a Google record, and sign up for Google Developers Console.

If you don't have a Google account you can agree to accept one here: Create your Google Account

Sign Up for Google Developers Console

When you agree to accept Google Developers Console, your Google account is naturally agreed to accept all administrations in Google Cloud, including SQL.

If you are another Cloud Platform client, you can begin with a time for testing for free.

The Cloud Platform free preliminary enables you to attempt Cloud SQL for nothing for 60 days. For more data, see Cloud Platform Free Trial.

If you choose to proceed with Cloud Platform after your free period (or in the event that you need more stockpiling or execution than the free use level offers), you pay for the assets you use.

To make a Google Developers Console account go to: https://console.developers.google.com/freetrial, and pursue the on-screen instructions.

Create a MySQL Database Instance

In this precedent we will set up a Database example running MySQL.

 Create a MySQL DB instance:

  • Once you have made your record Google will naturally make a new undertaking for you called "My First Project". In this model we will just utilize that project.
  • In the menu, click "Stockpiling", and afterward "Cloud SQL"
  • Click "Make an instance"
  • On the "Make Cloud SQL occurrence" page select a name, locale and execution level for your DB occurrence. In this model we will skirt the progressed options.
  • Click "Create"
  • The new DB example shows up in the rundown of DB occurrences (when it has the status "Runnable" it is prepared for use)
  • Click on the name of the example, and snap "Access Control" on the route pane
  • Click "IP address" in the sub-route sheet, and snap the "Solicitation IPv4 address" button
  • Keep this IP address, as it will be the IP address you use to interface with your database
  • Click "Clients" in the sub-route sheet, and snap the "New client" button
  • Specify a username and secret word for your database
  • Click "Approval" in the sub-route sheet, and snap the "+ Add thing" catch under Allowed Networks
  • Here you can indicate who approaches your database, It can be:
    • Your claim IP, or the IP of your server. Along these lines just you approach to your database
    • or, which permits all outside IP delivers to associate (this can be a security hazard, and cause additional costs)
  • Click "Save"
  • Click "Databases" in the route sheet, and snap the "New database" button
  • Specify a name for your database (you can leave different alternatives as they are except if you have explicit requirements)

Now you have a Google Cloud SQL database, with an IP that you can associate to.

Configure Database Connection in AppML

To design the database association, alter the appml_config file:

PHP model: appml_config.php

<?php echo("Access Forbidden");exit();?>
"dateformat" : "yyyy-mm-dd",
"databases" : [{
"connection" : "mydatabase",
"have" : "yourDatabaseURL",
"dbname" : "yourDatabaseName",
"username" : "yourUserName",
"password" : "yourPassword"

Edit the following:

  1. mydatabase - change to anything you desire the database association with be brought in your application
  2. yourDatabaseURL - change to the IP from the past step, and include the port 3306 (like this
  3. yourDatabaseName - change to the name of your database occasion in Google Cloud SQL
  4. yourUserName - change to the username you determined for your database in Google Cloud SQL
  5. yourPassword - change to the secret phrase you indicated for your database in Google Cloud SQL

AppML should now be designed to associate with your Google Cloud SQL database.

You would now be able to fill your database with data: