cloud-sql-basics

Create and manage Cloud SQL instances for MySQL, PostgreSQL, and SQL Server.

Updated Dec 9, 2025
One-click install
npx skills add https://github.com/Aki2022/skills --skill cloud-sql-basics-aki2022
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cloud-sql-basics
Source: https://github.com/Aki2022/skills/tree/main/cloud-sql-basics
Command: npx skills add https://github.com/Aki2022/skills --skill cloud-sql-basics-aki2022

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Setting up and connecting to a managed relational database on Google Cloud involves many steps—enabling APIs, provisioning instances, configuring users, and establishing secure connectivity. This Skill guides you through the entire Cloud SQL workflow for MySQL, PostgreSQL, and SQL Server without needing to memorize gcloud commands or connection patterns. ## Core Features & Use Cases - Instance Provisioning: Step-by-step gcloud commands to enable the SQL Admin API, create instances, set passwords, and create databases. - Secure Connectivity: Guidance on the Cloud SQL Auth Proxy, IAM roles, Private IP, and language connectors for Python, Java, Node.js, and Go. - Infrastructure as Code & MCP: Terraform examples for instances, databases, and users, plus Cloud SQL MCP server tools for agent-driven database management. - Use Case: You need a PostgreSQL database for a new application. Use this Skill to create a Cloud SQL for PostgreSQL instance, configure the postgres user, start the Auth Proxy, and connect with psql in minutes. ## Quick Start Ask the assistant to create a Cloud SQL for PostgreSQL instance and show you how to connect to it using the Cloud SQL Auth Proxy.

Frequently Asked Questions about cloud-sql-basics

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a Cloud SQL instance with gcloud?

Use gcloud sql instances create with flags like --database-version, --cpu, --memory, and --region after enabling the sqladmin.googleapis.com API. Then set a user password and create a database with gcloud sql users set-password and gcloud sql databases create.

How to connect to Cloud SQL from Python?

Install the cloud-sql-python-connector package with the appropriate driver extra, such as pg8000 for PostgreSQL. Use the Connector object with your instance connection name in project:region:instance format to establish secure connections without IP allowlists.

Which database versions does Cloud SQL support?

Cloud SQL supports MySQL 5.6 through 8.4, PostgreSQL 9.6 through 18, and SQL Server 2017 through 2025 in Express, Web, Standard, and Enterprise editions. PostgreSQL 18 is the default version for new instances.

What IAM role do I need to manage Cloud SQL instances?

The roles/cloudsql.admin role provides full control over all Cloud SQL resources. For read-only access use roles/cloudsql.viewer, and for application connectivity through the Auth Proxy grant roles/cloudsql.client to your service account.

Can I manage Cloud SQL with Terraform?

Yes, the Google Cloud Terraform provider supports google_sql_database_instance, google_sql_database, and google_sql_user resources. You can define instance settings like tier, database version, and backup configuration declaratively.

Does Cloud SQL support private IP connections?

Yes, Cloud SQL supports Private IP through VPC peering for MySQL and PostgreSQL, or through private services access and Private Service Connect for all engines. This keeps database traffic within the Google Cloud network.