Auf dieser Seite werden erste Schritte mit der Google Cloud CLI beschrieben, damit Sie damit Verbindungsprofile und Migrationsjobs für den Database Migration Service verwalten können.
Die Google Cloud CLI bietet die Google Cloud CLI für die Interaktion mit dem Database Migration Service und anderen Google Cloud Diensten. Die gcloud CLI verwendet die API für den Zugriff auf Database Migration Service. Daher müssen Sie die API aktivieren, bevor Sie das Tool verwenden können.
Lesen Sie die Google Cloud CLI-Dokumentation, um mit der gcloud CLI zu beginnen.
Mit dem Flag --help können Sie Hilfe für das Tool, Ressourcen und Befehle anfordern:
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-05 (UTC)."],[[["\u003cp\u003eThis guide explains how to use the Google Cloud CLI to manage Database Migration Service connection profiles and migration jobs.\u003c/p\u003e\n"],["\u003cp\u003eThe Google Cloud CLI uses the API to interact with Database Migration Service, requiring the API to be enabled for tool usage.\u003c/p\u003e\n"],["\u003cp\u003eYou can access help for the gcloud tool, resources, and commands by utilizing the \u003ccode\u003e--help\u003c/code\u003e flag.\u003c/p\u003e\n"],["\u003cp\u003eTo use the tool effectively, setting a default project in the gcloud CLI configuration is needed by running the \u003ccode\u003egcloud config set project [PROJECT_ID]\u003c/code\u003e command.\u003c/p\u003e\n"]]],[],null,["# Use the gcloud CLI\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n[MySQL](/database-migration/docs/mysql/use-the-cloud-sdk \"View this page for the MySQL version of Database Migration Service.\") \\| PostgreSQL \\| [PostgreSQL to AlloyDB](/database-migration/docs/postgresql-to-alloydb/use-the-cloud-sdk \"View this page for the PostgreSQL to AlloyDB version of Database Migration Service.\")\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nOverview\n--------\n\nThis page describes how to get started with the\n[Google Cloud CLI](/sdk/docs)\nso you can use it to manage Database Migration Service connection profiles and migration jobs.\n\nThe Google Cloud CLI\nprovides the Google Cloud CLI to interact with\nDatabase Migration Service and other Google Cloud services. The gcloud CLI\nuses the API to access Database Migration Service, so you must enable the API before you\ncan use the tool.\n\nFor `gcloud` examples, see [Manage connection profiles using the API](/database-migration/docs/postgres/api-connection-profiles) and [Manage migration jobs using the API](/database-migration/docs/postgres/api-migration-jobs).\n\nGet started with the Google Cloud CLI\n-------------------------------------\n\nTo start with the gcloud CLI, review the\n[Google Cloud CLI Documentation](/sdk/docs).\nYou can get help for the tool, resources, and\ncommands by using the `--help` flag: \n\n```bash\ngcloud database-migration --help\ngcloud database-migration connection-profiles create --help\ngcloud database-migration migration-jobs promote --help\n```\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```"]]