Migrate MySQL Data to Cloud SQL Using Database Migration Service

Solution for Migrate MySQL Data to Cloud SQL Using Database Migration Service. 1 lab: GSP351. Fast copy-paste commands for Google Cloud.

GSP351 — Migrate MySQL Data to Cloud SQL Using Database Migration Service: Challenge Lab

Estimated time: 1 hour 15 minutes

curl -LO https://raw.githubusercontent.com/Orbit-of-Ops/GCP-Scripts/refs/heads/main/scriipt5.sh

sudo chmod +x *.sh

./*.sh
# 1. Find the One-Time Cloud SQL instance name dynamically
ONE_TIME_SQL=$(gcloud sql instances list --format="value(name)" | grep -v "cont")

# 2. Connect to the instance and run the verification query
gcloud sql connect $ONE_TIME_SQL --user=admin --quiet --execute="use customers_data; select count(*) from customers;"