Skip to content
Skillpedia
APIs & servers (backend)33k · #8715

cloud-sql-basics

What it does

This skill helps your AI agent set up a managed relational database on Google Cloud. It is for developers who need MySQL, PostgreSQL or SQL Server hosted with less upkeep.

When to use it

  • ✓When you need to create a new Cloud SQL database instance on Google Cloud.
  • ✓When you want to set a password, create a database or get the connection name for an app.
  • ✓When you want to plan backups, high availability or secure connections for a database.

Skill link

https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/database/cloud-sql-basics/SKILL.md

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/database/cloud-sql-basics/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute →

Example of what to ask your AI

“Set up a PostgreSQL database on Google Cloud for my app in europe-west1.”

5 new skills a week. 1 minute to read.

How it works

The agent runs gcloud commands to enable the service, create the instance, add a database and set a user password. It also explains how to find the connection name your app needs.

Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

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:

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

    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:

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

    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:

    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:

    ./cloud-sql-proxy INSTANCE_CONNECTION_NAME
    

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

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

Reference Directory

  • Core Concepts: Instance architecture, high availability (HA), and supported database engines.

  • CLI Usage: Essential gcloud sql commands 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.

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

FAQ

What permission do I need?

You need the Cloud SQL Admin role or equivalent permissions to create and manage instances.

Which databases does it support?

It supports MySQL, PostgreSQL and SQL Server.

Does Google handle updates?

Yes, the service automates tasks such as patches, updates and backups.

Details

Original description by the author

Creates and manages Cloud SQL instances for MySQL, PostgreSQL, and SQL Server. Handles backups, high availability, and secure connectivity for relational database workloads on Google Cloud.

repo: davila7/claude-code-templates

Popularity

GitHub stars
33k
Ranking position
#8715
License
MIT
Updated
11/2/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills