Настройте репликацию MySQL в Google Cloud Platform через внутренние IP-адреса

В одном из наших проектов безопасность клиента запрещает экземпляры с внешними IP-подключениями, экземпляры локально подключены через VPN.
В этом проекте мы создали вторую сеть, разрешающую внешние соединения.

Мы хотим реплицировать существующий экземпляр Master MySQL в network-1 (без внешнего IP-адреса) на новый экземпляр Slave MySQL в сеть-2 (по умолчанию Google).

Я думал о подключении через внутренние IP-адреса, но попытки настройки, как с обычными внешними адресами, кажутся неудачными.

user@instance-1:~$ mysql -h 10.132.0.2 -u replicationuser -p
Enter password: 
ERROR 2003 (HY000): Can't connect to MySQL server on '10.132.0.2' (111)
0
задан 29 July 2018 в 15:34
1 ответ

I found the solution for this issue: Using VPC Network Peering: “Google Cloud Platform (GCP) Virtual Private Cloud (VPC) Network Peering allows private RFC 1918 connectivity across two VPC networks regardless of whether or not they belong to the same project or the same organization.” https://cloud.google.com/vpc/docs/using-vpc-peering I created a second VPC network, remember to choose manually subnet creation mode and to choose an IP address range that does not conflict with the one in the first VPC network.

0
ответ дан 5 December 2019 в 05:28

Теги

Похожие вопросы