Connecting to Google Cloud SQL with IPV6
Asked Answered
C

1

7

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?

Cynthiacynthie answered 14/5, 2015 at 21:6 Comment(6)
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/…Szabadka
And the important parts of your error message are missing.Teneshatenesmus
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)Cynthiacynthie
Have the same problem here. Can connect to IPv4 address, but cannot connect to IPv6 address.Wallywalnut
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.Brenda
Do you mean the host from which I'm trying to connect from?Cynthiacynthie
C
5

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.

Caloric answered 9/9, 2015 at 14:32 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.