Cloud Sql Basics

by google55b4e13eba6dNo licenseListed Oct 8, 2026Updated Oct 8, 2026

This file generates or explains Cloud SQL resources. Use this file when the user asks to create a Cloud SQL instance or database for MySQL, PostgreSQL, or SQL Server. Cloud SQL manages third-party MySQL, PostgreSQL, and SQL Server instances as resources in Cloud SQL. For example, when Cloud SQL creates an open-source MySQL instance, the resulting resource is a Cloud SQL for MySQL instance that Google Cloud manages. Cloud SQL handles backups, high availability, and secure connectivity for relational database workloads.

FeaturedInstructions onlyDevOps & Cloud
AI-generated overview

Explains and generates Google Cloud SQL resources for MySQL, PostgreSQL, and SQL Server.

What it does
This skill provides instructions and reference material for creating and managing Cloud SQL instances, databases, and users. It covers the gcloud CLI quick start, connection via the Cloud SQL Auth Proxy, IAM roles, client libraries, Terraform, MCP usage, and backup or disaster recovery topics. It produces guidance and command examples rather than files or scripts.
When to use it
Use it when a user asks to create or explain a Cloud SQL instance or database for MySQL, PostgreSQL, or SQL Server. It also fits questions about Cloud SQL connectivity, IAM permissions, backups, high availability, or infrastructure as code.
Requirements
Requires Google Cloud access with Cloud SQL Admin IAM permissions, the gcloud CLI, and the Cloud SQL Auth Proxy for connections. Reference material also covers client libraries, Terraform, and MCP usage. No scripts are shipped; it is instructions and references only.

Cloud SQL Basics

Cloud SQL is a fully managed relational database service for MySQL, PostgreSQL, and SQL Server. It automates time-consuming tasks like patches, updates, backups, and replicas, while providing high performance and availability for your applications.

Prerequisites

Ensure you have the necessary IAM permissions to create and manage Cloud SQL instances. The Cloud SQL Admin (roles/cloudsql.admin) role provides full access to Cloud SQL resources.

Quick Start (PostgreSQL)

  1. Enable the API:

    bash
    gcloud services enable sqladmin.googleapis.com --quiet
  2. Create an Instance:

    bash
    gcloud sql instances create INSTANCE_NAME \  --database-version=POSTGRES_18 \  --cpu=2 \  --memory=7680MiB \  --region=REGION \  --quiet
  3. Set a password for the default user:

    Because this is a Cloud SQL for PostgreSQL instance, the default admin user is postgres:

    bash
    gcloud sql users set-password postgres \  --instance=INSTANCE_NAME --password=PASSWORD \  --quiet
  4. Create a database:

    bash
    gcloud sql databases create DATABASE_NAME \  --instance=INSTANCE_NAME \  --quiet
  5. Get the instance connection name:

    You need the instance connection name (which is formatted as PROJECT_ID:REGION:INSTANCE_NAME) to connect using the Cloud SQL Auth Proxy. Retrieve it with the following command:

    bash
    gcloud sql instances describe INSTANCE_NAME \  --format="value(connectionName)" \  --quiet
  6. Connect to the instance:

    The Cloud SQL Auth Proxy must be running to be able to connect to the instance. In a separate terminal, start the proxy using the connection name:

    bash
    ./cloud-sql-proxy INSTANCE_CONNECTION_NAME

    With the proxy running, connect using psql in another terminal:

    bash
    psql "host=127.0.0.1 port=5432 user=postgres dbname=DATABASE_NAME password=PASSWORD sslmode=disable"

Reference Directory

  • Core Concepts [blocked]: Cloud SQL editions (Enterprise & Enterprise Plus), instance architecture, read pools, high availability (HA), and supported database engines.

  • CLI Usage [blocked]: Essential gcloud sql commands for instance, database, and user management.

  • Client Libraries & Connectors [blocked]: Connecting to Cloud SQL using Python, Java, Node.js, and Go.

  • MCP Usage [blocked]: Using the Cloud SQL remote MCP server and Gemini CLI extension.

  • Infrastructure as Code [blocked]: Terraform configuration for instances, databases, and users.

  • IAM & Security [blocked]: Predefined roles, SSL/TLS certificates, and Auth Proxy configuration.

  • Disaster Recovery & Backups [blocked]: Backup types, Point-in-Time Recovery (PITR), replicas, read pools comparison, and Enterprise Plus Advanced DR.

If you need product information not found in these references, use the Developer Knowledge MCP server search_documents tool.

Source and attribution

Source:google/skillsinskills/cloud/cloud-sql-basicsat commit55b4e13

License: No license

Content belongs to its original authors. SourceWeft indexes it from a public repository.

Report or request removal

More from google/skills

Google Cloud Solution N Tier Serverless Web App

google

Featured

Guides design and Terraform implementation of secure n-tier serverless web apps on Google Cloud.

DevOps & CloudOct 8, 2026

Google Cloud Solution Hybrid Search Alloydb

google

Featured

Discovers requirements and generates architectural, design, and deployment guidance for dynamic hybrid search systems by combining semantic search and keyword search. Optimized for AlloyDB hybrid search use cases in Google Cloud. Use when users need vector search combined with structured SQL filtering, faceted attributes, semantic reranking, in-database AI validation, or serverless hosting across transactional relational databases, analytical data warehouses, or managed database engines. DON'T use this skill for simple keyword-only search, or when a standalone non-relational vector database is required.

Awaiting classificationOct 8, 2026

Google Cloud Solution Architecture

google

Featured

Interactively discovers requirements and designs holistic, multi-product system architectures, solution blueprints, and deployment recommendations for complex workloads on Google Cloud. Use when designing end-to-end cloud solutions, selecting and integrating Google Cloud services, generating architecture diagrams, or conducting requirements discovery for new cloud workloads or migrations. Don't use for single-product tasks (use product-specific skills), initial onboarding or authentication (use google-cloud-recipe-*), Well-Architected Framework reviews or audits (use google-cloud-waf-*), or workloads covered by specialized solution skills.

Awaiting classificationOct 8, 2026

Google Cloud Solution Agentic Ai Data Science Workflow

google

Featured

Designs a tailored multi-product agentic data science architecture on Google Cloud that incorporates opinionated best practices. Use when architecting multi-product solutions for agent-based data analytics or ML workloads. Don't use for simple queries, non-agentic pipelines, general cloud reviews, or writing agent code.

Awaiting classificationOct 8, 2026

Google Cloud Solution Agentic Ai Borderless Data Lakehouse

google

Featured

Discovers requirements and designs a borderless open data lakehouse using Lakehouse for Apache Iceberg and BigQuery data agents. Use when architecting multi-cloud storage infrastructure (Cloud Storage, AWS S3, Azure Blob), establishing ingestion and AI serving subsystems, configuring Cross-Cloud Interconnect, or deploying Gemini Enterprise Agent Platform and BigQuery data agents. Don't use for single-cloud data warehouses, or when the focus is on Knowledge Catalog metadata governance and Spark-driven IDE analytics workflows (use google-cloud-solution-agentic-analytics-spark-knowledge-catalog instead).

Awaiting classificationOct 8, 2026

Google Cloud Solution Agentic Ai Bidirectional Streaming

google

Featured

Guides agents to interactively discover customer requirements for live, bidirectional multi-agent AI systems that process continuous streams of multimodal data for real-time technical guidance and safety monitoring. Generates a custom Google Cloud solution that uses opinionated best practices and architecture guidance. Use when users need agentic assistance to design and create a multi-product solution in the cloud for live bidirectional multimodal streaming workloads. Don't use for simple text-based chat applications or workloads without real-time streaming requirements.

Awaiting classificationOct 8, 2026