MySQL data to Cloud SQL using
Database Migration Service |
Migrating On-premises MySQL
Using a Continuous Database
Migration Service Job|1001+
expert curated questions and
answers | GUARANTEED
SUCCESS
GSP859
Comprehensive Task Assessment Guide: Task 1 – Get MySQL Source
Instance Connectivity Information
Objective
Identify the internal IP address of the source MySQL database instance
(dms-mysql-training-vm-v2) to prepare for migration to Cloud SQL.
,Step-by-Step Execution Guide
1. Access Google Cloud Console
Navigate to: Google Cloud Console
Ensure you are in the correct project where the VM instance exists.
2. Locate the VM Instance
1. From the Navigation Menu (☰), select:
Compute Engine > VM instances
o Alternative path: Direct link –
Copy
https://console.cloud.google.com/compute/instances
2. Identify the Target VM:
o Look for the instance named dms-mysql-training-vm-v2 in the
list.
o If not visible, verify:
Correct project selection.
Sufficient permissions (Compute Viewer or Owner role).
3. Retrieve the Internal IP Address
In the VM instances table, locate the "Internal IP" column for dms-
mysql-training-vm-v2.
Copy the IP (e.g., 10.128.0.2).
Key Examinable Information
Critical Checks
Checkpoint Expected Outcome Troubleshooting
Correct
VM dms-mysql-training-vm- Switch projects via the
project
v2 is visible Cloud Console dropdown.
selected
,Checkpoint Expected Outcome Troubleshooting
VM is running Status = "Running" Start the VM if stopped.
IP
Internal IP is Check VPC network
format: 10.x.x.x or 192.168
assigned configuration if missing.
.x.x
Common Errors & Fixes
Error Root Cause Solution
Wrong project/region or Verify IAM roles
VM not listed
insufficient permissions (compute.instances.list).
No Internal IP VM not fully provisioned or Restart VM or check
assigned network misconfiguration subnet settings.
"Permission Missing Compute Request access from
Denied" Viewer role project admin.
Advanced Verifications
1. Validate Network Connectivity
From Cloud Shell, test connectivity to the MySQL source:
bash
Copy
ping <Internal_IP> # e.g., ping 10.128.0.2
o Expected: Successful replies.
o If blocked: Check firewall rules (gcloud compute firewall-rules
list).
2. Confirm MySQL Port Accessibility
Verify port 3306 is open:
bash
, Copy
nc -zv <Internal_IP> 3306
o Success: Connection to <IP> 3306 port [tcp/mysql] succeeded!
o Failure: Adjust firewall rules to allow TCP:3306.
3. Cross-Project Access (If Applicable)
If the VM is in another project:
bash
Copy
gcloud compute instances describe dms-mysql-training-vm-v2 \
--project=source-project-id \
--format="value(networkInterfaces[0].networkIP)"
Documentation & Best Practices
1. Security Note:
o Never expose the internal IP publicly.
o Use VPC peering or Cloud VPN for hybrid connections.
2. Backup the IP:
o Store the IP in a secure note or Google Secret Manager:
bash
Copy
echo -n "10.128.0.2" | gcloud secrets create mysql-source-ip --data-file=-
3. Automation (Optional):
o Retrieve the IP programmatically:
bash
Copy
gcloud compute instances describe dms-mysql-training-vm-v2 \
--format="value(networkInterfaces[0].networkIP)"