Skip to main content

Cloud SQL for MySQL – Qwik Start (GSP151)

Updated 2 min readMarkdown

☁️ Cloud SQL for MySQL – Qwik Start (GSP151) Summary

https://dataedo.com/asset/img/blog/tutorials/google_cloud_console.png

https://docs.cloud.google.com/static/shell/docs/images/launch-within-docs.png

https://i.sstatic.net/PfP2x.png

Here’s a quick revision + exam-style understanding guide for your 15-minute lab.


✅ Task 1: Create a Cloud SQL Instance

Steps:

  1. Go to Navigation Menu → Cloud SQL

  2. Click Create Instance

  3. Choose:

    • Database Engine → MySQL

    • Edition → Enterprise

    • Preset → Development

    • Version → MySQL 8

  4. Instance ID → myinstance

  5. Generate and save root password

  6. Region → us-west1

  7. Primary Zone → us-west1-b

  8. Click Create

✔ After creation, green checkmark confirms success.


🔎 Concept Question

Instance ID is used to uniquely identify your instance within the project.

✅ Answer: TRUE

Yes, Instance ID uniquely identifies the Cloud SQL instance inside your Google Cloud project.


✅ Task 2: Connect Using MySQL Client (Cloud Shell)

Open Cloud Shell and run:

gcloud sql connect myinstance --user=root
  • Click Authorize

  • Enter root password

  • You’ll see:

mysql>

✔ Now you're connected to the database server.


✅ Task 3: Create Database & Insert Data

Step 1: Create Database

CREATE DATABASE guestbook;

Step 2: Use Database

USE guestbook;

Step 3: Create Table

CREATE TABLE entries (
    guestName VARCHAR(255),
    content VARCHAR(255),
    entryID INT NOT NULL AUTO_INCREMENT,
    PRIMARY KEY(entryID)
);

Step 4: Insert Data

INSERT INTO entries (guestName, content) VALUES 
("first guest", "I got here!"),
("second guest", "Me too!");

Step 5: Retrieve Data

SELECT * FROM entries;

✔ Output:

guestNamecontententryID
first guestI got here!1
second guestMe too!2

🎯 Key Learning Outcomes

After completing this lab, you can:

✔ Create a managed MySQL database in Google Cloud
✔ Connect securely using Cloud Shell
✔ Perform basic SQL operations (CREATE, INSERT, SELECT)
✔ Understand Cloud SQL instance configuration

No comments yet. Be the first to comment.

More from this blog