Membuat dan menjalankan tugas migrasi MySQL yang berisi metadata dengan klausa DEFINER
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Ringkasan
Tugas migrasi MySQL
tidak memigrasikan data pengguna. Oleh karena itu,
sumber yang berisi metadata yang ditentukan oleh pengguna dengan klausa DEFINER akan
gagal saat dipanggil di replika Cloud SQL baru, karena pengguna belum
ada di sana.
Untuk mengidentifikasi nilai DEFINER yang ada dalam metadata, Anda dapat menjalankan
kueri berikut di database sumber MySQL. Periksa hasil untuk entri root%localhost atau untuk pengguna yang tidak ada di instance tujuan:
[[["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-08-18 UTC."],[[["\u003cp\u003eMySQL migration jobs do not migrate user data, leading to potential failures when metadata defined with the \u003ccode\u003eDEFINER\u003c/code\u003e clause is invoked on the new Cloud SQL replica if the users are not present.\u003c/p\u003e\n"],["\u003cp\u003eYou can identify which \u003ccode\u003eDEFINER\u003c/code\u003e values exist in your metadata by running specific queries on your MySQL source database, checking for \u003ccode\u003eroot%localhost\u003c/code\u003e or users absent in the destination instance.\u003c/p\u003e\n"],["\u003cp\u003eTo ensure a successful migration, you must either create the necessary users on the destination Cloud SQL replica before starting the migration job, or update the \u003ccode\u003eDEFINER\u003c/code\u003e clause to \u003ccode\u003eINVOKER\u003c/code\u003e on the source MySQL instance.\u003c/p\u003e\n"],["\u003cp\u003eMetadata created by \u003ccode\u003e'root'@'localhost'\u003c/code\u003e will cause the process to fail, and you will need to change the definer to a different user before starting the migration.\u003c/p\u003e\n"]]],[],null,[]]