5
votes

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?

1
You appear to be giving an incorrect IP address to the mysql command. With a few exceptions all of ::/3 is reserved. The IP address you are using doesn't match any of the ranges allocated according to iana.org/assignments/ipv6-address-space/…kasperd
And the important parts of your error message are missing.Michael Hampton
The address I put here is a dummy one. I triple checked the real address on the google console and it's correct. ERROR 2003 (HY000): Can't connect to MySQL server on 'xxxx:xxxx:xxxx:x:xxxx:xxxx:xxxx:xxxx' (65)zbee
Have the same problem here. Can connect to IPv4 address, but cannot connect to IPv6 address.Victor K.
Does the host you are on have IPv6 connectivity? If you cannot connect to ipv6.whatismyv6.com then you can't use IPv6 at all.David

1 Answers

3
votes

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.