google-compute-engine,mysql-replication"/>
  • 15
name

A PHP Error was encountered

Severity: Notice

Message: Undefined index: userid

Filename: views/question.php

Line Number: 191

Backtrace:

File: /home/prodcxja/public_html/questions/application/views/question.php
Line: 191
Function: _error_handler

File: /home/prodcxja/public_html/questions/application/controllers/Questions.php
Line: 433
Function: view

File: /home/prodcxja/public_html/questions/index.php
Line: 315
Function: require_once

In one of our projects customer security prohibits instances with external IP connections, the instances are on-premise connected via VPN.
In this project we set up a second network, allowing external connections.

We want to replicate an existing Master MySQL instance in network-1 (without external IP address) to a new Slave MySQL instance in network-2 (Google default).

My thought is to connect via the internal IP addresses, but attempts configuring as with normal external addresses seem to fail.

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)

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
Reply Report

Warm tip !!!

This article is reproduced from Stack Exchange / Stack Overflow, please click

Trending Tags