0
votes

Am new to Google Cloud SQL. I just created a instance in Cloud Console.

Now I like to connect to that Instance via my localhost phpMyAdmin. But CloudSQL doestn't have any host name to configure. It only have IPV6 adress. So am little confused about how to do. I already tried by editing 'config.inc.php' file using ipv6 address. But it giving me the error below

2002 - php_network_getaddresses: getaddrinfo failed: No such host is known.

The server is not responding (or the local server's socket is not correctly configured).

And my config file details are below

$i++;
$cfg['Servers'][$i]['verbose'] = '*****';
$cfg['Servers'][$i]['host'] = '2001:4860:4864:1:****:****:***:****';
$cfg['Servers'][$i]['port'] = '';
$cfg['Servers'][$i]['socket'] = '';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '**********';
$cfg['Servers'][$i]['AllowNoPassword'] = true;
1
Does your host where you're install phpmyadmin have IPv6 connectivity? - Rowland Shaw
@RowlandShaw I just installed phpmyadmin in my laptop. I need extra software for IPv6 connectivity? - Vinoth Kannan
You can always get an IPv4 address and use that one if your network doesn't support IPv6. - Juan Enrique Muñoz Zolotoochin
Yes, in this case your local machine needs to know about IPv6 in order to connect to the server via an IP6 connection. You'll need to configure IPv6 networking on your localhost. - Isaac Bennetch

1 Answers

0
votes

As Juan Enrique pointed out you could (and in this case definitely should) use the IPv4 instead of the IPv6 protocol.

Its value is just listed above the IPv6 value in the Cloud SQL Overview page.

Don't forget also to authorize your local IP to access that Cloud SQL instance in the Edit page, or you won't be able to connect.