Build a Cloud SQL instance with API Explorer
Create a database in your Cloud SQL instance
Create a Cloud Storage bucket
Upload the CSV file to your Cloud Storage bucket
Add Storage Admin role to Cloud SQL service account
APIs Explorer: Cloud SQL
The Google APIs Explorer is a tool that helps you explore various Google APIs interactively. With the APIs Explorer, you can:
- Browse quickly through available APIs and versions.
- See methods available for each API and what parameters they support along with inline documentation.
- Execute requests for any method and see responses in real time.
- Make authenticated and authorized API calls.
- Search across all services, methods, and your recent requests to quickly find what you are looking for.
Cloud SQL is a fully-managed database service that makes it easy to set up, maintain, manage, and administer your relational PostgreSQL and MySQL databases in the cloud. Cloud SQL offers high performance, scalability, and convenience. Hosted on Google Cloud, Cloud SQL provides a database infrastructure for applications running anywhere.
In this lab you will build a Cloud SQL instance and attach a MySQL database to it. After creating a sample CSV file and uploading it to Cloud Storage, you will create a table and pull the file’s contents into your MySQL database. Finally, you will remove the database and it’s associated data. You will accomplish these tasks with the Cloud SQL Admin API, where you will call various methods through the APIs Explorer tool.
In this lab, you will use the APIs Explorer tool to:
- Build a Cloud SQL instance.
- Configure a MySQL SQL database and attach it to a Cloud SQL instance.
- Pull CSV data from a Cloud Storage bucket and upload it to a MySQL database table.
- Delete a MySQL database.
This is a fundamental level lab. You should be familiar with the basic functioning and architecture of APIs. Experience with Google Cloud Shell and command line interface tools is recommended.
Familiarity with the the APIs Explorer tool is also recommended. At a minimum, take the following labs before attempting this one:
If you are unfamiliar with Cloud SQL, the labs Cloud SQL for MySQL: Qwik Start and Introduction to SQL for BigQuery and Cloud SQL have valuable information that will orient you with the content of this lab. Once you're ready, scroll down and follow the steps below to get your lab environment set up.
Join Qwiklabs to read the rest of this lab...and more!
- Get temporary access to the Google Cloud Console.
- Over 200 labs from beginner to advanced levels.
- Bite-sized so you can learn at your own pace.