So I want to connect to a google cloud sql instance using it's free ipv6 adress instead of buying an ipv4 address. For that I looked ip my ipv6 address and allowed it. I also looked up my routers ipv6 prefix and allowed that (afaik that should allow all pc in my home network to access the sql instance).
The following code creates the problem:
$servername = "2001:6532:1234:1:6a4f:e1d7:5d69:52a3";
$username = "looooool";
$password = "superSecretStuff";
$dbname = "myDB";
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
And that code generates this error:
Warning: mysqli::mysqli(): php_network_getaddresses: getaddrinfo failed: Der angegebene Host ist unbekannt. in C:\Users\kjh\Documents\SF WEBSITE\appengine-try-php-master\connect_db.php on line 8
Warning: mysqli::mysqli(): (HY000/2002): php_network_getaddresses: getaddrinfo failed: Der angegebene Host ist unbekannt. in C:\Users\kjh\Documents\SF WEBSITE\appengine-try-php-master\connect_db.php on line 8
Connection failed: php_network_getaddresses: getaddrinfo failed: Der angegebene Host ist unbekannt.
I'm sorry that the error message is in german, but I don't know where I would even change that. Also line 8 is the line with $conn = new mysqli($servername, $username, $password, $dbname);
on it. I've changed the ip adress so if it looks wierd that is why. Hope you can help me.
Ninja edit: If I get an IPv4 adress from google it works without any problems.