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

Erik Johnsson picture Erik Johnsson · Apr 26, 2015 · Viewed 14.1k times · Source

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?

Answer

Zeehad picture Zeehad · Mar 21, 2016

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.