Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use MySQL Workbench to set up connection and connect Google cloud sql

I follow this tutorial https://cloud.google.com/sql/docs/admin-tools

but it is very abstract.

I am unable to set up a new connection in MYSQL workbench correctly. It always pops up "failed to connect MySQL at 2001:4860:4864:1:c88e:be5b:bd5:6cf7:3306 with user root,10060"

My google cloud SQL IP address is 2001:4860:4864:1:c88e:be5b:bd5:6cf7,port is 3306 username :root. (I set root ) password : admin, each time.

I have put my computer's ipv4 address to Cloud SQL allowed network (Authorization).

Question I guessed:

  1. Actually I am not sure how to fill 'port', in local , I know it is 3306 in general. I am not sure if the port is 3306 as well when the instance address is ipv6 format.

  2. Is it possible I made mistake when set up my IP address in Cloud SQL authorization? I used laptop in my home internet. First I just searched my ip address using google 'my ip address', 108.15.38.144', then fill it in the "allowed network" in Cloud SQL.

  3. Is it possible I made mistake when I set up user 'root'? I just type user name and password in user setting of access control in Cloud Sql I didn't change clienthost's default value :% when I set up user,

Connection error image:

Connection error image

Any ideas on what I could be doing wrong here?

like image 521
Erik Johnsson Avatar asked Apr 26 '15 04:04

Erik Johnsson


People also ask

How do I connect Google Cloud locally to SQL?

In the Google Cloud console, go to the Cloud SQL Instances page. To open the Overview page of an instance, click the instance name. Select Connections from the SQL navigation menu. In the Authorized networks section, click Add network and enter the IP address of the machine where the client is installed.

Can I use MySQL on Google cloud?

You can use Cloud SQL, Google Cloud Marketplace, or manually install MySQL on Compute Engine. Cloud SQL offers MySQL as a web service. You can use Cloud SQL to host your MySQL database in Google's cloud, and let Google Cloud handle administrative duties like replication, patch management, and database management.

Can MySQL workbench connect to SQL Server?

The MySQL Workbench provides a graphical user interface for working with SQL servers and databases. You can use it to create entity relation diagrams, manage servers, and run SQL queries.


1 Answers

Connectivity from MySQL Workbench to Google Cloud SQL is possible by following instructions here. Make sure access for external applications is configured properly.

Also, if your ISP does not support IPv6 connectivity, then you will not be able to use the IPv6 address provided to facilitate connections. In this case, you will have to request an IPv4 address for your Cloud SQL instance.

like image 79
Zeehad Avatar answered Oct 02 '22 20:10

Zeehad