About the gcloud CLI

MySQL  |  PostgreSQL  |  SQL Server

This page describes how to get started with thegcloud CLI so you can use it to manage Cloud SQL instances. The gcloud CLI uses the Cloud SQL Admin API to access Cloud SQL, so you must enable the API before you can use the gcloud CLI to access Cloud SQL.

Forgcloud examples, see theHow-to page for the task.

Getting started with the gcloud CLI

To start with the gcloud CLI, review thegcloud CLI Documentation.You can get help for the tool, resources, andcommands by using the--help flag:

gcloudsql--helpgcloudsqlinstances--helpgcloudsqlinstancescreate--help

The help displayed with the--help flag is also available inthegcloud CLI reference forgcloud sql.

Finally, configure a project as your default project withtwo commands. The first command below lists theconfiguration for the gcloud CLI, including any default projectalready set. The second command sets the default project.

gcloudconfiglistgcloudconfigsetproject[PROJECT_ID]

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-12-17 UTC.