Managing Google Cloud SQL Instances

Hands-On Lab

 

Photo of Joseph Lowery

Joseph Lowery

Google Cloud Training Architect II in Content

Length

00:30:00

Difficulty

Beginner

When working with Cloud SQL on any scale, you’ll need to manage multiple instances: creating, cloning, starting, stopping, restarting, and — eventually — deleting them. This hands-on lab gives you the experience of performing all those tasks so you’ll be familiar with the steps necessary to handle Cloud SQL instances completely.

What are Hands-On Labs?

Hands-On Labs are scenario-based learning environments where learners can practice without consequences. Don't compromise a system or waste money on expensive downloads. Practice real-world skills without the real-world risk, no assembly required.

Managing Google Cloud SQL Instances

In this hands-on lab, we'll manage multiple instances, including creating, cloning, starting, stopping, restarting, and — eventually — deleting them. By the end, we'll be familiar with the steps necessary to handle Cloud SQL instances completely.

How to Log in to Google Lab Accounts

On the lab page, right-click Open GCP Console and select the option to open it in a new private browser window (this option will read differently depending on your browser — e.g., in Chrome, it says "Open Link in Incognito Window"). Then, sign in to Google Cloud Platform using the credentials provided on the lab page.

On the Welcome to your new account screen, review the text, and click Accept. In the "Welcome L.A.!" pop-up once you're signed in, check to agree to the terms of service, choose your country of residence, and click Agree and Continue.

Managing Google Cloud SQL Instances

Now, on to the lab!

Create instance.

  1. From the main navigation, click Cloud SQL.
  2. Click Create instance.
  3. Choose your database engine — for this lab, we'll go with MySQL.
  4. Enter an instance ID (e.g., "la-sql").
  5. Provide a password (e.g., "root").
  6. Click Create. It will take a few minutes to spin up.

Create a database.

  1. Select the recently created Cloud SQL instance.
  2. Choose Create database.
  3. Name the database (e.g., "sql_data"), and leave the other fields at their default values.
  4. Click Create.

Clone the instance.

  1. From the Instance details page, choose the clone icon at the top.
  2. Enter a new name for the clone if desired.
  3. Choose Clone latest state of instance.
  4. Click Create clone.

Stop and start an instance.

  1. Select the first instance created.
  2. Click Stop.
  3. After the instance has stopped, click Start.

Restart an instance.

  1. Select the cloned instance.
  2. Click Restart.

Delete an instance.

  1. Select the cloned instance.
  2. Click the trash can icon to delete it.
  3. Enter the name of the instance in the dialog to confirm the deletion.
  4. Click Delete.

Conclusion

Congratulations on completing this lab!