Halaman ini menjelaskan cara memulai
gcloud CLI
agar Anda dapat menggunakannya untuk mengelola instance Cloud SQL. Gcloud CLI
menggunakan Cloud SQL Admin API untuk mengakses Cloud SQL, sehingga Anda harus mengaktifkan API sebelum
dapat menggunakan gcloud CLI untuk mengakses Cloud SQL.
Untuk mengetahui contoh gcloud, lihat
halaman Petunjuk untuk tugas tersebut.
Memulai gcloud CLI
Untuk memulai gcloud CLI, baca Dokumentasi
gcloud CLI.
Anda bisa mendapatkan bantuan untuk alat, resource, dan
perintah menggunakan flag --help:
Bantuan yang ditampilkan dengan flag --help juga tersedia di
referensi gcloud CLI untuk
gcloud sql.
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-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```"]]