如何通过 SSL 连接到 Google Cloud SQL?
How to connect to Google Cloud SQL by SSL?
我已经创建了一个 ssl follow:
并阅读这份文件:
我创建了一个新的mysql实例后,将三个pem文件下载到本地。我想连接到该服务器:
mysql -u<USERNAME> -p -h <IP_ADDRESS> --ssl-ca=/local/path/to/server-ca.pem --ssl-cert=/local/path/to/client-cert.pem --ssl-key=/local/path/to/client-key.pem
然后输入密码,它又说:
ERROR 2013 (HY000): Lost connection to MySQL server at 'reading initial communication packet', system error: 0
为什么?
您是否遵循了解释如何将 IP 地址添加到云 SQL 实例的授权网络列表的 instructions under the heading "Grant access to your instance? It links to another document。即使在使用 SSL 证书时,您也必须将 IP 地址添加为授权网络。
我已经创建了一个 ssl follow:
并阅读这份文件:
我创建了一个新的mysql实例后,将三个pem文件下载到本地。我想连接到该服务器:
mysql -u<USERNAME> -p -h <IP_ADDRESS> --ssl-ca=/local/path/to/server-ca.pem --ssl-cert=/local/path/to/client-cert.pem --ssl-key=/local/path/to/client-key.pem
然后输入密码,它又说:
ERROR 2013 (HY000): Lost connection to MySQL server at 'reading initial communication packet', system error: 0
为什么?
您是否遵循了解释如何将 IP 地址添加到云 SQL 实例的授权网络列表的 instructions under the heading "Grant access to your instance? It links to another document。即使在使用 SSL 证书时,您也必须将 IP 地址添加为授权网络。