Google Cloud · Databases
Cloud SQL
Managed MySQL, PostgreSQL and SQL Server with automated backups, high availability, read replicas and maintenance windows.
On the Google Cloud Associate Cloud Engineer exam listRelational databaseDisaster recovery
What it is and what problem it solves
Cloud SQL runs MySQL, PostgreSQL or SQL Server for you: Google provisions, patches (in your maintenance window), backs up and monitors the instance. High availability adds a standby in another zone with automatic failover; read replicas (including cross-region) scale reads and support disaster recovery. Applications connect over private IP, through the Cloud SQL Auth Proxy or language connectors, optionally with IAM database authentication.
When to use it
- Typical relational applications: web backends, SaaS, line-of-business systems.
- Lift-and-shift of existing MySQL, PostgreSQL or SQL Server databases.
- Workloads that fit on one primary instance with read replicas.
When to avoid it
- Global scale or writes beyond one machine: Spanner.
- Very demanding PostgreSQL workloads or mixed analytics: AlloyDB.
- Analytics over large data: BigQuery.
Cost model
What you pay for
- vCPU and memory per hour by edition (Enterprise or Enterprise Plus).
- Storage and backups; HA doubles compute.
- Read replicas and network egress.
Where it is cost-efficient
Right-sized instances with committed use discounts; HA only where needed.
Where costs grow
Oversized instances, unused replicas, storage auto-increase without cleanup.
Cost controls and common surprises
Rightsizing recommendations, committed use discounts and query optimisation (Query Insights).
Prices differ by Region and change over time; see the pricing page linked under Sources.
Security
Controls the service provides
Encryption at rest (CMEK optional) and in transit; private IP; IAM database authentication; automated patching.
What you configure
Use private IP and connectors, IAM authentication instead of shared passwords, least-privilege database roles, and deletion protection.
Availability, backup and failure behavior
Regional HA protects against a zone failure; cross-region read replicas, promoted on failover, protect against region loss.
Exam cues and common confusions
- Survive a zone failure: Cloud SQL high availability (regional instance).
- Scale reads or disaster recovery to another region: (cross-region) read replicas.
- Connect securely without managing certificates: Cloud SQL Auth Proxy or connectors.
- Point-in-time recovery: enable it with automated backups.
Related
Courses and lessons
- Cloud Run Scaled; the Database Didn't · Google Cloud in Production · Members
- The Region Went Down · Google Cloud in Production · Members
Services, comparisons and patterns
- AlloyDB for PostgreSQL · Service
- Spanner · Service
- Cloud Run · Service
- Google Kubernetes Engine (GKE) · Service
- Cloud SQL vs AlloyDB vs Spanner vs Firestore · Comparison
- High availability · Concept
Sources
Independent study material, not affiliated with or endorsed by Google. Google Cloud and service names are trademarks of Google LLC.