Auf dieser Seite werden erste Schritte mit der gcloud CLI beschrieben, damit Sie es zur Verwaltung von Cloud SQL-Instanzen verwenden können. Die gcloud CLI verwendet die Cloud SQL Admin API, um auf Cloud SQL zuzugreifen. Daher müssen Sie die API aktivieren, bevor Sie die gcloud CLI verwenden können, um auf Cloud SQL zuzugreifen.
Beispiele für gcloud finden Sie auf der Anleitungsseite der Aufgabe.
Erste Schritte mit der gcloud CLI
Lesen Sie die Dokumentation zur gcloud CLI, bevor Sie die gcloud CLI verwenden.
Mit dem Flag --help können Sie Hilfe für das Tool, Ressourcen und Befehle anfordern:
Die Hilfe, die Sie mit dem Flag --help aufrufen können, ist auch in der gcloud CLI-Referenz für gcloud sql verfügbar.
Zum Abschluss konfigurieren Sie mit zwei Befehlen ein Projekt als Ihr Standardprojekt. Mit dem ersten unten angegebenen Befehl wird die Konfiguration für die gcloud CLI aufgelistet, einschließlich eines eventuell bereits festgelegten Standardprojekts. Mit dem zweiten Befehl wird das Standardprojekt festgelegt.
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2025-09-04 (UTC)."],[],[],null,["# About the gcloud CLI\n\n\u003cbr /\u003e\n\n[MySQL](/sql/docs/mysql/cloud-sdk \"View this page for the MySQL database engine\") \\| [PostgreSQL](/sql/docs/postgres/cloud-sdk \"View this page for the PostgreSQL database engine\") \\| SQL Server\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/sqlserver/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```"]]