On the detail page of our Cloud SQL Instance, take note of Public IP address.
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.
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.
Join MindStick Community
You need to log in or register to vote on answers or questions.
We use cookies to ensure you have the best browsing experience on our website. By using our site, you
acknowledge that you have read and understood our
Cookie Policy &
Privacy Policy.
Can you answer this question?
Write Answer1 Answers