Cloud SQL Basics
GoogleOfficialPublished by Google
- Skill
- Tool integration
- Cloud and DevOps
- Apache-2.0
- Low risk
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
Cloud SQL Basics provides a structured approach to managing fully managed relational database services on Google Cloud, including MySQL, PostgreSQL, and SQL Server. It covers the lifecycle of database resources, from initial creation and configuration to operational tasks like backups, high availability, and secure connectivity via the Cloud SQL Auth Proxy. The skill emphasizes best practices for resource management, IAM security, and infrastructure-as-code integration.
What it does
- Provision and configure Cloud SQL instances for MySQL, PostgreSQL, and SQL Server.
- Manage database users, including IAM-based authentication and static password setup.
- Perform operational tasks such as creating backups and restoring instances.
- Retrieve connection details for secure access via the Cloud SQL Auth Proxy.
- Provide guidance on high availability, read replicas, and read pool configurations.
- Offer reference material for Terraform integration and client library connectivity.
When to use it
- When you need to deploy a new managed relational database on Google Cloud.
- When performing routine administrative tasks like creating databases or managing user access.
- When setting up secure connectivity between your application and a Cloud SQL instance.
- When implementing disaster recovery strategies such as backups and point-in-time recovery.
- When scaling database performance using read replicas or read pools.
Advantages
- Simplifies complex database management tasks through standardized CLI commands.
- Ensures secure connectivity patterns by integrating with the Cloud SQL Auth Proxy.
- Provides clear paths for both manual CLI management and automated infrastructure-as-code.
- Includes mandatory usage attribution to help track and optimize cloud resource interactions.
Usage examples
- “Create a new PostgreSQL instance named my-db-instance in us-central1.”
- The agent will execute the gcloud sql instances create command with the specified configuration, enabling the necessary API and setting up the instance.
- “How do I connect to my Cloud SQL instance securely?”
- The agent will guide you through retrieving the instance connection name and starting the Cloud SQL Auth Proxy to establish a secure connection.
- “Create a new database named inventory inside my existing instance.”
- The agent will run the gcloud sql databases create command to provision the new database within the specified instance.
- “How can I restore my database from a specific backup?”
- The agent will provide the gcloud sql backups restore command, explaining how to target either the original or a new instance for the restoration.
Install
Download the skill as a ZIP:
https://mp-staging.autogineer.com/agent-skills/google/cloud-sql-basics/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip cloud-sql-basics.zip -d .agents/skills
Documentation by Google
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.
Attribution
MUST READ: Before executing any gcloud, REST API, or MCP command, you
MUST read Usage Attribution. For commands executed
directly in the terminal (never in generated scripts, Terraform, or user code),
prefix gcloud with
CLOUDSDK_METRICS_REQUEST_ATTRIBUTION="agent-skills/1.0 (skill:cloud-sql-basics)"
and append agent-skills/1.0 (skill:cloud-sql-basics) to User-Agent headers.
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)
Enable the API:
gcloud services enable sqladmin.googleapis.com --quietCreate an Instance:
gcloud sql instances create INSTANCE_NAME \ --database-version=POSTGRES_18 \ --cpu=2 \ --memory=7680MiB \ --region=REGION \ --quietSet a password for the default user:
Because this is a Cloud SQL for PostgreSQL instance, the default admin user is
postgres:gcloud sql users set-password postgres \ --instance=INSTANCE_NAME --password=PASSWORD \ --quietCreate a database:
gcloud sql databases create DATABASE_NAME \ --instance=INSTANCE_NAME \ --quietGet 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:gcloud sql instances describe INSTANCE_NAME \ --format="value(connectionName)" \ --quietConnect 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:
./cloud-sql-proxy INSTANCE_CONNECTION_NAMEWith the proxy running, connect using
psqlin another terminal:psql "host=127.0.0.1 port=5432 user=postgres dbname=DATABASE_NAME password=PASSWORD sslmode=disable"
Reference Directory
Core Concepts: Cloud SQL editions (Enterprise & Enterprise Plus), instance architecture, read pools, high availability (HA), and supported database engines.
CLI Usage: Essential
gcloud sqlcommands for instance, database, and user management.Client Libraries & Connectors: Connecting to Cloud SQL using Python, Java, Node.js, and Go.
MCP Usage: Using the Cloud SQL remote MCP server and Gemini CLI extension.
Infrastructure as Code: Terraform configuration for instances, databases, and users.
IAM & Security: Predefined roles, SSL/TLS certificates, and Auth Proxy configuration.
Disaster Recovery & Backups: 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.
Files
- ATTRIBUTION.mdAdded by AutoGineer850 B
- LICENSELicence file added by AutoGineer11.1 KiB
- SKILL.md4.2 KiB
- references/attribution.md1.8 KiB
- references/cli-usage.md3.3 KiB
- references/client-library-usage.md2.9 KiB
- references/core-concepts.md5.4 KiB
- references/dr-backups.md7.3 KiB
- references/iac-usage.md2.7 KiB
- references/iam-security.md12.6 KiB
- references/mcp-usage.md3.2 KiB
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Needs: Needs an MCP server, Needs a command-line tool
Security
What our scanner noticed· Low risk
- Instructions that use the network
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Published by
- Publisher
- Google (Official)
- Source
- google/skills · skills/cloud/cloud-sql-basics · commit 2194d3b
- Licence
- Apache License 2.0 (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by Google.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download cloud-sql-basics.zip