Google Cloud SQL 通过本地 phpMyAdmin 实例
Google Cloud SQL Instance through local phpMyAdmin
我是 Google Cloud SQL 的新手。我刚刚在 Cloud Console 中创建了一个实例。
现在我想通过本地主机 phpMyAdmin 连接到该实例。但是 CloudSQL 没有任何主机名可以配置。它只有 IPV6 地址。所以我对如何做有点困惑。我已经尝试使用 ipv6 地址编辑 'config.inc.php' 文件。但它给了我下面的错误
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).
我的配置文件详细信息如下
$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;
正如 Juan Enrique 指出的那样,您可以(在这种情况下绝对应该)使用 IPv4 而不是 IPv6 协议。
它的值刚好在 Cloud SQL 概述页面中的 IPv6 值上方列出。
别忘了在编辑页面授权你的本地IP访问那个云SQL实例,否则你将无法连接。
我是 Google Cloud SQL 的新手。我刚刚在 Cloud Console 中创建了一个实例。
现在我想通过本地主机 phpMyAdmin 连接到该实例。但是 CloudSQL 没有任何主机名可以配置。它只有 IPV6 地址。所以我对如何做有点困惑。我已经尝试使用 ipv6 地址编辑 'config.inc.php' 文件。但它给了我下面的错误
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).
我的配置文件详细信息如下
$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;
正如 Juan Enrique 指出的那样,您可以(在这种情况下绝对应该)使用 IPv4 而不是 IPv6 协议。
它的值刚好在 Cloud SQL 概述页面中的 IPv6 值上方列出。
别忘了在编辑页面授权你的本地IP访问那个云SQL实例,否则你将无法连接。