Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Connecting to Google Cloud SQL with IPV6

I've been trying to connect unsuccessfully to my google cloud sql database (mysql) with the IPV6 address that Google gives you.

mysql -h 0:0:0:0:0:aaaa:aaaa:aaaa -u admin -p

The client prompts for a password but it won't allow me to connect.

ERROR 2003 (HY000): Can't connect to MySQL server on ...

If I use the IPV4 I can connect without any issues. Has anyone else experienced any issues with this?

like image 767
zbee Avatar asked May 14 '15 21:05

zbee


People also ask

Does Google Cloud support IPv6?

Google Cloud supports IPv6 clients with proxy load balancers such as the global external HTTP(S) load balancers, External SSL Proxy Load Balancing, and External TCP Proxy Load Balancing.

How do I connect Google Cloud 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.


1 Answers

If your ISP does not support IPv6 connectivity, then you will not be able to use the IPv6 address provided. If this is the case, then you will need to request an IPv4 address for your Cloud SQL instance. Then you must authorize the IP address from which you will be connecting (not the IP address of your Cloud SQL instance). The process can be found in this article on ‘Connecting from External Applications’.

It is important to note that while your IPv6 address is free to use, assigning an IPv4 address will incur additional charges. I recommend reviewing the pricing information for Cloud SQL so you can get a better idea of how this is calculated.

I hope that this information is helpful.

like image 104
m00 Avatar answered Sep 19 '22 14:09

m00