GCP · Database
Cloud SQL
Managed MySQL, Postgres, SQL Server.
Official docsOverview
Cloud SQL handles backups, replicas, HA failover and patching for popular relational engines.
When to use it
- OLTP workloads
- Drop-in DB for migrated apps
- QA fixture DB with PITR
Setup
- Enable Cloud SQL Admin API.
- Create instance: pick engine, region, machine type, HA.
- Set authorized networks or use Cloud SQL Auth Proxy.
How to use
Connect via proxy
./cloud-sql-proxy PROJECT:us-central1:qa-db &
psql 'host=127.0.0.1 dbname=qa user=app'Clone for test env
gcloud sql instances clone qa-db qa-db-pr-42QA use cases
- Clone production-like snapshots for performance and data-migration tests.
