This tutorial demonstrates how to create and configure a cloud SQL database for your Google Cloud account, as well as how to gain access, which enables you to control and connect it with API Express from Appery.io.
- Open the Google Developers Console.
- To create an SQL cloud, click on the View all products on the left menu:
- On the list, select Databases > SQL:
- Click + CREATE INSTANCE and select the required database engine (MySQL):
- In the new window, define the remaining parameters such as: Instance ID, Database version, Region, set the password and then click CREATE INSTANCE:
By default, you will find yourself in the Overview tab:
You can check that the instance is created and saved under your account:
- For creating a new SQL database to be used with API Express from Appery.io, switch to the database Connections > Networking tab:
- Click the ADD NETWORK button, define the connection name and set 0.0.0.0/0 for Network:
- Then, switch to the Users tab and click + ADD USER ACCOUNT.
Then, create new user account(s) to access your database:
Please note, that you might need to follow the steps in Exposing Your Database to API Express to configure firewall rules.
- Log in to your Appery.io online account.
- In the Appery.io App Builder, go to the API Express tab and click Create new DB connection, fill in all the required information, enter its name, and confirm:
- In the next window, select *Relational database connection type, then set MySQL as the Database type, and add Host (Public IP address which can be found on the Google Cloud Overview tab – see below for details):
- Now, define its Port (3306 – the default MySQL port), Database name (can be found on the Google Cloud Databases tab), and provide the username and password for your MySQL DB (check your Google Cloud account) created earlier.
You have now created the Appery.io DB connection. To ensure that the connection from the API Express services to your Google SQL Cloud works, click Test.
Updated over 1 year ago