Database Migration Service memungkinkan Anda memigrasikan data ke instance tujuan Cloud SQL,
lalu menyiapkan replika baca cascading untuk instance tersebut.
Replika baca bertingkat
memungkinkan Anda membuat replika baca di bawah replika baca Cloud SQL di region yang sama atau
berbeda sebelum mempromosikan instance ke utama. Anda dapat menambahkan hingga empat
level replika baca bertingkat, termasuk instance utama.
Replika baca bertingkat di Cloud SQL untuk MySQL hanya didukung untuk
replikasi berbasis ID transaksi global (GTID).
Jika Anda ingin menggunakan replika baca bertingkat dalam migrasi,
tetapkan GTID_MODE ke ON di instance sumber Anda.
Menyiapkan replika baca bertingkat
Untuk memigrasikan data ke tujuan Cloud SQL yang menggunakan replika baca cascading:
Siapkan dan mulai tugas migrasi Anda. Untuk mengetahui informasi selengkapnya, lihat
Membuat tugas migrasi.
Tunggu hingga fase dump penuh tugas selesai dan tugas migrasi
memasuki fase pengambilan data perubahan (CDC). Tugas migrasi Anda berada dalam fase
CDC jika kolom Status di halaman Tugas migrasi menunjukkan substatus
CDC.
Setelah berada di fase CDC, Anda dapat menyiapkan replika baca cascading. Untuk mengetahui informasi tentang cara membuat replika baca bertingkat untuk instance tujuan Cloud SQL, lihat Menyiapkan replika bertingkat.
Anda dapat mempromosikan replika Cloud SQL ke instance utama menggunakan Database Migration Service.
Untuk informasi tentang cara mempromosikan instance tujuan, lihat
Mempromosikan migrasi.
Saat Anda mempromosikan replika Cloud SQL ke instance utama, hierarki replika
bertingkat akan dipertahankan.
[[["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-05 UTC."],[[["\u003cp\u003eDatabase Migration Service enables the migration of data to a Cloud SQL destination instance, with the ability to set up cascading read replicas.\u003c/p\u003e\n"],["\u003cp\u003eCascading read replicas allow the creation of a read replica under another Cloud SQL read replica, supporting up to four levels, including the primary instance.\u003c/p\u003e\n"],["\u003cp\u003eTo use cascading read replicas, you need to set \u003ccode\u003eGTID_MODE\u003c/code\u003e to \u003ccode\u003eON\u003c/code\u003e on the source instance, as it is only supported for global transaction identifier (GTID)-based replication.\u003c/p\u003e\n"],["\u003cp\u003eCascading read replicas can be set up once the migration job enters the change data capture (CDC) phase, after the initial full data dump.\u003c/p\u003e\n"],["\u003cp\u003ePromoting the Cloud SQL replica to a primary instance via the Database Migration Service maintains the existing cascading replica hierarchy.\u003c/p\u003e\n"]]],[],null,["# Set up cascading read replicas for a Cloud SQL destination instance\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nMySQL \\| [PostgreSQL](/database-migration/docs/postgres/set-up-cascading-replica \"View this page for the PostgreSQL version of Database Migration Service.\") \\| PostgreSQL to AlloyDB\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nOverview\n--------\n\nDatabase Migration Service lets you migrate data to a Cloud SQL destination instance,\nand then set up cascading read replicas for that instance.\n\n[Cascading read replicas](/sql/docs/mysql/replication#cascading-replicas)\nlet you create a read replica under a Cloud SQL read replica in the same or\ndifferent region before promoting your instance to primary. You can add up to four\nlevels of cascading read replicas, including the primary instance.\nCascading read replicas in Cloud SQL for MySQL are supported only for [global transaction identifier (GTID)-based replication](https://dev.mysql.com/doc/mysql-replication-excerpt/8.0/en/replication-gtids-concepts.html). If you want to use cascading read replicas in your migration, set `GTID_MODE` to `ON` on your source instance.\n\nSet up cascading read replicas\n------------------------------\n\nTo migrate your data to a Cloud SQL destination that is using cascading read\nreplicas:\n\n1. Set up and start your migration job. For more information, see\n [Create a migration job](/database-migration/docs/mysql/create-migration-job).\n\n2. Wait until the full dump phase of the job completes and the migration job\n enters the change data capture (CDC) phase. Your migration job is in the CDC\n phase when the **Status** column in the **Migration jobs** page indicates a *CDC*\n substatus.\n\n3. Once in the CDC phase, you can set up your cascading read replica. For\n information about how to create cascading read replicas for a Cloud SQL destination\n instance, see [Set up a cascading replica](/sql/docs/mysql/replication/configure-replication-from-external#set_up_a_cascading_replica).\n\n4. You can promote your Cloud SQL replica to primary instance using Database Migration Service.\n For information about promoting a destination instance, see\n [Promote a migration](/database-migration/docs/mysql/promote-migration).\n\nWhen you promote the Cloud SQL replica to a primary instance, the replica's cascading\nreplica hierarchy is retained."]]