C

cloud-sql-basics

by @googlev
4.5(120)

このスキルは、Google Cloud SQL リレーショナルデータベースサービスの基本的な管理機能を提供し、インスタンスの作成、構成、接続、セキュリティ設定をカバーします。MySQL、PostgreSQL、SQL Server データベースのデプロイとメンテナンスを自動化し、開発効率を大幅に向上させ、アプリケーションデータの高性能と高可用性を保証します。

gcpcloud-sqldatabaseinfrastructuresql-serverGitHub
インストール方法
npx skills add https://github.com/google/skills --skill cloud-sql-basics
compare_arrows

Before / After 効果比較

1 组
使用前

データベースインスタンスの手動デプロイは、環境設定、ネットワーク設定、ユーザー権限管理、基本的なセキュリティ強化に多大な時間を要します。この複雑でエラーが発生しやすいプロセスは、利用可能なインスタンスを準備するまでに数時間かかることがよくあります。

使用後

Cloud SQL の自動化ツールとコマンドラインインターフェースを活用することで、データベースインスタンスを迅速に作成、構成、接続できます。手作業と潜在的なエラーを大幅に削減し、数分で本番環境対応のデータベースを構築できます。

SKILL.md

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.

ユーザーレビュー (0)

レビューを書く

効果
使いやすさ
ドキュメント
互換性

レビューなし

統計データ

インストール数14.7K
評価4.5 / 5.0
バージョン
更新日2026年10月24日
比較事例1 件

ユーザー評価

4.5(120)
5
37%
4
43%
3
13%
2
5%
1
2%

この Skill を評価

0.0

対応プラットフォーム

🤖claude-code

タイムライン

作成2026年5月28日
最終更新2026年10月24日
🎁 Agent 知識カード
アンケート