---
title: "Testing Connection to Cloud SQL instance with a MySQL client from VM Instance."  
description: "Testing Connection to Cloud SQL instance with a MySQL client from VM Instance."  
author: "Nishi Tiwari"  
published: 2020-01-08  
updated: 2020-01-08  
canonical: https://www.mindstick.com/forum/155658/testing-connection-to-cloud-sql-instance-with-a-mysql-client-from-vm-instance  
category: "webhosting"  
tags: ["google cloud"]  
reading_time: 1 minute  

---

# Testing Connection to Cloud SQL instance with a MySQL client from VM Instance.

[explain](https://www.mindstick.com/forum/157854/what-is-system-debugging-explain-some-system-debugging-tools-used-in-modern-computer-systems) it.

## Replies

### Reply by Nishi Tiwari

- On the detail page of our Cloud SQL Instance, take note of Public IP address.

![Testing Connection to Cloud SQL instance with a MySQL client from VM Instance.](https://www.mindstick.com/mindstickforums/b3b0f972-aaca-4fc1-ae88-eff405bcf38e/images/caad81ac-d52e-4b5d-b9c9-a554dbdc2486.png)

- Now return to our VM Instance and test our connection.
- Click on the Navigation Menu go to Compute Engine then VM Instances.
- On our newly created VM, Click on SSH, this would open a new window with SSH connection to our VM instance.

![Testing Connection to Cloud SQL instance with a MySQL client from VM Instance.](https://www.mindstick.com/mindstickforums/b3b0f972-aaca-4fc1-ae88-eff405bcf38e/images/0b25d9f5-9445-4041-9ea9-4babd0fbef96.png)

- On the SSH window, execute these following commands, remember to change 35.202.255.49 to your own Cloud SQL Instance’s Public IP.
- sudo apt-get update
- sudo apt-get install mysql-client -y
- mysql — host=35.202.255.49 — user=root — password
- You’ll get a password prompt, enter that password which used when creating the Cloud SQL Instance, if correct, you’ll get connected to your SQL Instance.

![Testing Connection to Cloud SQL instance with a MySQL client from VM Instance.](https://www.mindstick.com/mindstickforums/b3b0f972-aaca-4fc1-ae88-eff405bcf38e/images/6adce48c-aaa2-4a58-9178-7937c98872b3.png)\


---

Original Source: https://www.mindstick.com/forum/155658/testing-connection-to-cloud-sql-instance-with-a-mysql-client-from-vm-instance

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
