Questa pagina descrive come iniziare a utilizzare
gcloud CLI
in modo da poterla utilizzare per gestire le istanze Cloud SQL. gcloud CLI
utilizza l'API Cloud SQL Admin per accedere a Cloud SQL, quindi devi abilitare l'API prima di poter utilizzare gcloud CLI per accedere a Cloud SQL.
Per iniziare a utilizzare gcloud CLI, consulta la documentazione
gcloud CLI.
Puoi ricevere assistenza per lo strumento, le risorse e i comandi utilizzando il flag --help:
La guida visualizzata con il flag --help è disponibile anche nel riferimento per gcloud CLI per gcloud sql.
Infine, configura un progetto come progetto predefinito con
due comandi. Il primo comando riportato di seguito elenca la
configurazione per gcloud CLI, incluso qualsiasi progetto predefinito
già impostato. Il secondo comando imposta il progetto predefinito.
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Difficile da capire","hardToUnderstand","thumb-down"],["Informazioni o codice di esempio errati","incorrectInformationOrSampleCode","thumb-down"],["Mancano le informazioni o gli esempi di cui ho bisogno","missingTheInformationSamplesINeed","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 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```"]]