Halaman ini menjelaskan cara memulai
Google Cloud CLI
agar Anda dapat menggunakannya untuk mengelola profil koneksi dan tugas migrasi Database Migration Service.
Google Cloud CLI menyediakan Google Cloud CLI untuk berinteraksi dengan Database Migration Service dan layanan Google Cloud lainnya. Gcloud CLI
menggunakan API untuk mengakses Database Migration Service, sehingga Anda harus mengaktifkan API sebelum
dapat menggunakan alat tersebut.
Terakhir, konfigurasikan project sebagai project default Anda dengan
dua perintah. Perintah pertama di bawah ini mencantumkan
konfigurasi untuk gcloud CLI, termasuk project default apa pun
yang telah ditetapkan. Perintah kedua menetapkan project default.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-09-03 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 utilizes the API for Database Migration Service, requiring the API to be enabled prior to tool usage.\u003c/p\u003e\n"],["\u003cp\u003eYou can access help for the Google Cloud CLI's tools, resources, and commands using the \u003ccode\u003e--help\u003c/code\u003e flag.\u003c/p\u003e\n"],["\u003cp\u003eTo configure the default project for the Google Cloud CLI, use the \u003ccode\u003egcloud config list\u003c/code\u003e command to view current settings and \u003ccode\u003egcloud config set project [PROJECT_ID]\u003c/code\u003e to establish the default.\u003c/p\u003e\n"]]],[],null,["# Use the gcloud CLI\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nMySQL \\| [PostgreSQL](/database-migration/docs/postgres/use-the-cloud-sdk \"View this page for the PostgreSQL version of Database Migration Service.\") \\| [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/mysql/api-connection-profiles) and [Manage migration jobs using the API](/database-migration/docs/mysql/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```"]]