Nesta página, descrevemos como dar os primeiros passos com a
CLI gcloud.
Dessa maneira, é possível usá-la para gerenciar instâncias do Cloud SQL. A CLI gcloud
usa a API Cloud SQL Admin para acessar o Cloud SQL. Portanto, você precisa ativar a API antes de
usar a CLI gcloud para acessar o Cloud SQL.
Para começar a usar a CLI gcloud, consulte a
documentação da CLI gcloud.
É possível receber ajuda com a ferramenta, ver os recursos e
os comandos usando a sinalização --help:
A ajuda exibida com a sinalização --help também está disponível na
referência da CLI gcloud para
gcloud sql.
Por fim, configure um projeto como o projeto padrão com dois comandos. O primeiro comando abaixo lista a configuração da CLI gcloud, incluindo o projeto padrão já definido. O segundo comando define o projeto padrão.
[[["Fácil de entender","easyToUnderstand","thumb-up"],["Meu problema foi resolvido","solvedMyProblem","thumb-up"],["Outro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Informações incorretas ou exemplo de código","incorrectInformationOrSampleCode","thumb-down"],["Não contém as informações/amostras de que eu preciso","missingTheInformationSamplesINeed","thumb-down"],["Problema na tradução","translationIssue","thumb-down"],["Outro","otherDown","thumb-down"]],["Última atualização 2025-09-04 UTC."],[],[],null,["# About the gcloud CLI\n\n\u003cbr /\u003e\n\nMySQL \\| [PostgreSQL](/sql/docs/postgres/cloud-sdk \"View this page for the PostgreSQL database engine\") \\| [SQL Server](/sql/docs/sqlserver/cloud-sdk \"View this page for the SQL Server database engine\")\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nThis page describes how to get started with the\n[gcloud CLI](/sdk/docs)\nso you can use it to manage Cloud SQL instances. The gcloud CLI\nuses the Cloud SQL Admin API to access Cloud SQL, so you must enable the API before you\ncan use the gcloud CLI to access Cloud SQL.\n\nFor `gcloud` examples, see the\n[How-to page](/sql/docs/mysql/how-to) for the task.\n\nGetting started with the gcloud CLI\n-----------------------------------\n\nTo start with the gcloud CLI, review the\n[](/sdk/docs)[gcloud CLI](/sdk/gcloud) Documentation.\nYou can get help for the tool, resources, and\ncommands by using the `--help` flag: \n\n```bash\ngcloud sql --help\ngcloud sql instances --help\ngcloud sql instances create --help\n```\n\nThe help displayed with the `--help` flag is also available in\nthe [gcloud CLI](/sdk/gcloud) reference for\n[gcloud sql](/sdk/gcloud/reference/sql).\n\n\nFinally, configure a project as your default project with\ntwo commands. The first command below lists the\nconfiguration for the gcloud CLI, including any default project\nalready set. The second command sets the default project. \n\n```bash\ngcloud config list\ngcloud config set project [PROJECT_ID]\n```"]]