View a markdown version of this page

Prececk deskripsi untuk meningkatkan Aurora MySQL versi 3 ke versi 8.4 - Amazon Aurora

Terjemahan disediakan oleh mesin penerjemah. Jika konten terjemahan yang diberikan bertentangan dengan versi bahasa Inggris aslinya, utamakan versi bahasa Inggris.

Prececk deskripsi untuk meningkatkan Aurora MySQL versi 3 ke versi 8.4

Prececks berikut berjalan ketika Anda meng-upgrade dari Aurora MySQL versi 3 (kompatibel dengan MySQL 8.0) ke Aurora MySQL versi 8.4 (kompatibel dengan MySQL 8.4). Prakecek ini mengidentifikasi potensi masalah kompatibilitas sebelum pemutakhiran dimulai.

Kesalahan

Prececks berikut menghasilkan kesalahan saat precheck gagal, dan pemutakhiran tidak dapat dilanjutkan.

MySQL memeriksa sebelumnya yang melaporkan kesalahan

Precheck berikut berasal dari MySQL Komunitas:

usang RouterAuthMethod

Tingkat precheck: Kesalahan

Periksa metode otentikasi usang atau tidak valid yang digunakan oleh akun internal MySQL Router

Precheck ini memvalidasi bahwa akun internal MySQL Router tidak menggunakan metode otentikasi usang atau tidak valid yang dapat dihapus atau diubah di MySQL 8.4. Akun MySQL Router secara otomatis dibuat pada waktu bootstrap ketika Router tidak diinstruksikan untuk menggunakan akun yang ada.

Contoh keluaran:

{ "id": "deprecatedRouterAuthMethod", "title": "Check for deprecated or invalid authentication methods in use by MySQL Router internal accounts.", "status": "OK", "description": "Warning: The following accounts are MySQL Router accounts that use a deprecated authentication method.\nThose accounts are automatically created at bootstrap time when the Router is not instructed to use an existing account. Please upgrade MySQL Router to the latest version to ensure deprecated authentication methods are no longer used.\nSince version 8.0.19 it's also possible to instruct MySQL Router to use a dedicated account. That account can be created using the AdminAPI.", "documentationLink": "https://dev.mysql.com/doc/mysql-shell/en/configuring-router-user.html https://dev.mysql.com/doc/mysql-router/en/mysqlrouter.html#option_mysqlrouter_account", "detectedProblems": [ { "level": "Error", "dbObject": "mysql_router_test@%", "description": " - router user with deprecated authentication method." } ] }

Precheck mengembalikan kesalahan karena mysql_router_test akun menggunakan metode otentikasi usang seperti atau. mysql_native_password sha256_password

Untuk memverifikasi metode otentikasi yang digunakan:

SELECT user, host, plugin FROM mysql.user WHERE user = 'mysql_router_test';

Resolusi:

Perbarui akun MySQL Router untuk menggunakan otentikasi: caching_sha2_password

ALTER USER 'mysql_router_test'@'%' IDENTIFIED WITH caching_sha2_password BY 'new_password';

Atau, upgrade MySQL Router ke versi terbaru untuk memastikan metode otentikasi usang tidak lagi digunakan. Sejak versi 8.0.19, Anda juga dapat menginstruksikan MySQL Router untuk menggunakan akun khusus yang dibuat menggunakan AdminAPI.

partisi WithPrefixKeys

Tingkat precheck: Kesalahan

Memeriksa partisi dengan kunci menggunakan kolom dengan indeks kunci awalan

Precheck ini mengidentifikasi tabel yang dipartisi yang menggunakan kolom dengan indeks kunci awalan dalam kunci partisi mereka. Indeks pada awalan kolom tidak didukung untuk partisi kunci — mereka diabaikan oleh fungsi partisi dan tidak diizinkan pada MySQL 8.4.0.

Untuk informasi selengkapnya, lihat Pembatasan dan batasan pada partisi dalam dokumentasi MySQL.

Contoh keluaran:

{ "id": "partitionsWithPrefixKeys", "title": "Checks for partitions by key using columns with prefix key indexes", "status": "OK", "description": "Indexes on column prefixes are not supported for key partitioning, they are ignored by the partition function and so they are not allowed as of 8.4.0. This check identifies tables with partitions defined this way, they should be fixed before upgrading to 8.4.0.", "documentationLink": "https://dev.mysql.com/doc/refman/en/partitioning-limitations.html", "detectedProblems": [ { "level": "Error", "dbObject": "test.test_partition_prefix", "description": "Error: the `test`.`test_partition_prefix` table uses partition by KEY using the following columns with prefix index: name." } ] }

Resolusi:

-- Check for prefix indexes (Sub_part column shows prefix length) SHOW INDEX FROM test.test_partition_prefix; -- Option 1: Change partition to use non-prefix columns only ALTER TABLE test.test_partition_prefix PARTITION BY KEY (id) PARTITIONS 4; -- Option 2: Remove prefix from index ALTER TABLE test.test_partition_prefix DROP PRIMARY KEY, ADD PRIMARY KEY (id, name); -- Full column, no prefix -- Option 3: Remove partitioning ALTER TABLE test.test_partition_prefix REMOVE PARTITIONING;
ColumnDefinition

Tingkat precheck: Kesalahan

Memeriksa kesalahan dalam definisi kolom

Precheck ini memvalidasi bahwa semua definisi kolom kompatibel dengan persyaratan MySQL 8.4. Ini secara khusus mengidentifikasi kolom jenis FLOAT atau DOUBLE dengan set AUTO_INCREMENT bendera, yang tidak lagi didukung di MySQL 8.4.

Contoh keluaran:

{ "id": "columnDefinition", "title": "Checks for errors in column definitions", "status": "OK", "description": "Identifies column definitions that may not be supported in future versions of MySQL", "detectedProblems": [ { "level": "Error", "dbObject": "test.test_column_def.id", "description": "The column is of type FLOAT and has the AUTO_INCREMENT flag set, this is no longer supported." } ] }

Resolusi:

Ubah jenis kolom dari FLOAT atau DOUBLE ke tipe integer:

-- Check current definition SHOW CREATE TABLE test.test_column_def\G -- Change FLOAT AUTO_INCREMENT to BIGINT AUTO_INCREMENT ALTER TABLE test.test_column_def MODIFY COLUMN id BIGINT NOT NULL AUTO_INCREMENT; -- Verify SHOW CREATE TABLE test.test_column_def\G

Aurora MySQL memeriksa sebelumnya yang melaporkan kesalahan

Precheck berikut khusus untuk Aurora MySQL:

aurora UnsupportedPluginsCheck

Tingkat precheck: Kesalahan

Periksa plugin yang tidak didukung

Aurora-specific Precheck ini mengidentifikasi plugin yang tidak didukung di Aurora MySQL versi 8.4. Aurora memiliki persyaratan kompatibilitas plugin khusus yang berbeda dari MySQL komunitas.

Contoh keluaran:

{ "id": "auroraUnsupportedPluginsCheck", "title": "Check for unsupported plugins", "status": "OK", "description": "Checks for unsupported plugins installed in the database", "documentationLink": "https://docs.aws.amazon.com/AmazonRDS/latest/AuroraMySQLReleaseNotes/", "detectedProblems": [ { "level": "Error", "dbObject": "all", "description": "Plugin simple_parser loaded in the engine. To proceed with the upgrade, remove this plugin." } ] }

Resolusi:

Copot pemasangan plugin yang tidak didukung:

UNINSTALL PLUGIN plugin_name;
aurora UnsupportedComponentsCheck

Tingkat precheck: Kesalahan

Periksa komponen yang tidak didukung

Precheck ini memvalidasi bahwa tidak ada komponen MySQL yang tidak didukung di Aurora MySQL versi 8.4 yang saat ini diinstal atau aktif. Komponen berbeda dari plugin dan menyediakan fungsionalitas yang diperluas melalui infrastruktur komponen.

Contoh keluaran:

{ "id": "auroraUnsupportedComponentsCheck", "title": "Check for unsupported components", "status": "OK", "description": "Checks for unsupported components installed in the database", "documentationLink": "https://docs.aws.amazon.com/AmazonRDS/latest/AuroraMySQLReleaseNotes/", "detectedProblems": [ { "level": "Error", "dbObject": "all", "description": "Component file://component_log_sink_json loaded in the engine. To proceed with the upgrade, uninstall this component." } ] }

Resolusi:

Copot pemasangan komponen yang tidak didukung:

UNINSTALL COMPONENT 'component_name';
aurora UpgradeCheckForSysSchemaObjectTypeMismatch

Tingkat precheck: Kesalahan

Periksa ketidakcocokan tipe objek untuk skema sys

Precheck ini memvalidasi bahwa semua objek dalam sys skema memiliki tipe dan definisi objek yang benar. Skema sys adalah skema sistem yang menyediakan tampilan dan prosedur untuk pemantauan dan diagnostik database. Ketidakcocokan dapat terjadi jika skema dimodifikasi atau rusak secara manual.

Contoh keluaran:

{ "id": "auroraUpgradeCheckForSysSchemaObjectTypeMismatch", "title": "Check object type mismatch for sys schema.", "status": "OK", "description": "Database contains objects with type mismatch for sys schema.", "detectedProblems": [ { "level": "Error", "dbObject": "sys.host_summary", "description": "Your object sys.host_summary has a type mismatch. To fix the inconsistency we recommend to rename or remove the object before upgrading (use RENAME TABLE command)." } ] }

Resolusi:

-- Check the object type SELECT TABLE_NAME, TABLE_TYPE FROM information_schema.tables WHERE TABLE_SCHEMA = 'sys' AND TABLE_NAME = 'host_summary'; -- Option 1: Rename the mismatched object RENAME TABLE sys.host_summary TO sys.host_summary_backup; -- Option 2: Drop the mismatched object DROP TABLE sys.host_summary;

Peringatan

Prechecks berikut menghasilkan peringatan ketika precheck gagal, tetapi upgrade dapat dilanjutkan.

MySQL memeriksa sebelumnya yang melaporkan peringatan

Precheck berikut berasal dari MySQL Komunitas:

usang DefaultAuth

Tingkat precheck: Peringatan

Periksa metode otentikasi default yang tidak digunakan lagi atau tidak valid dalam variabel sistem

Precheck ini memvalidasi bahwa variabel default_authentication_plugin sistem tidak disetel ke metode otentikasi usang.

penting

MySQL 8.4.0 menghapus opsi usang sepenuhnya. default_authentication_plugin mysql_native_passwordPlugin dinonaktifkan secara default pada MySQL 8.4.0 dan dapat dihapus dalam versi future.

Untuk informasi selengkapnya tentang perubahan otentikasi di versi 8.4, lihat. Pertimbangan keamanan untuk upgrade dari Aurora MySQL versi 3 ke versi 8.4

Contoh keluaran:

{ "id": "deprecatedDefaultAuth", "title": "Check for deprecated or invalid default authentication methods in system variables.", "status": "OK", "description": "The following variables have problems with their set authentication method:", "detectedProblems": [ { "level": "Warning", "dbObject": "default_authentication_plugin", "description": "mysql_native_password authentication method is deprecated and it should be considered to correct this before upgrading to 8.4.0 release." }, { "level": "Warning", "dbObject": "authentication_policy", "description": "mysql_native_password authentication method is deprecated and it should be considered to correct this before upgrading to 8.4.0 release." } ] }

Resolusi:

Perbarui variabel sistem otentikasi yang akan digunakancaching_sha2_password:

  1. Buka konsol Amazon RDS dan arahkan ke grup Parameter.

  2. Pilih grup parameter cluster DB Anda.

  3. Ubah parameter berikut:

    • default_authentication_plugin = caching_sha2_password

    • authentication_policy = caching_sha2_password,*,

  4. Terapkan perubahan. Reboot mungkin diperlukan.

Pastikan klien aplikasi Anda mendukung caching_sha2_password otentikasi sebelum melakukan perubahan ini. Beberapa pustaka klien MySQL yang lebih lama mungkin tidak mendukung metode otentikasi ini.

asing KeyReferences

Tingkat precheck: Peringatan

Memeriksa kunci asing yang tidak mereferensikan indeks unik lengkap

Precheck ini memastikan bahwa semua referensi kendala kunci asing melengkapi indeks kunci unik atau primer. Kunci asing untuk indeks sebagian mungkin dilarang pada MySQL 8.4.0.

Contoh keluaran:

{ "id": "foreignKeyReferences", "title": "Checks for foreign keys not referencing a full unique index", "status": "OK", "description": "Foreign keys to partial indexes may be forbidden as of 8.4.0, this check identifies such cases to warn the user.", "detectedProblems": [ { "level": "Warning", "dbObject": "sample.child_table_ibfk_1", "description": "invalid foreign key defined as 'child_table(parent_name)' references a non unique key at table 'parent_table'." } ] }

Resolusi:

Pilih opsi yang paling sesuai dengan aplikasi Anda:

-- Option 1: Add unique index on parent table (if values are unique) ALTER TABLE test.parent_table ADD UNIQUE INDEX idx_parent_name_unique (parent_name); -- Option 2: Drop the foreign key if not needed ALTER TABLE test.child_table DROP FOREIGN KEY child_table_ibfk_1;

Aurora MySQL memeriksa peringatan laporan itu

Precheck berikut khusus untuk Aurora MySQL:

aurora ValidatePasswordPluginCheck

Tingkat precheck: Peringatan

Periksa plugin validate_password yang tidak digunakan lagi

Precheck ini mengidentifikasi penggunaan plugin usangvalidate_password. Di MySQL 8.0+, fungsionalitas validate_password diimplementasikan kembali sebagai komponen (). component_validate_password Aurora MySQL versi 8.4 memerlukan migrasi ke implementasi berbasis komponen.

Untuk informasi selengkapnya, lihat Migrasi komponen validasi kata sandi.

Contoh keluaran:

{ "id": "auroraValidatePasswordPluginCheck", "title": "Check for deprecated validate_password plugin", "status": "OK", "description": "The validate_password plugin is deprecated in Aurora MySQL 8.4", "detectedProblems": [ { "level": "Warning", "dbObject": "validate_password", "description": "The validate_password plugin is deprecated and will be removed in a future release. It is recommended to transition to the validate_password component." } ] }

Resolusi:

-- Check current plugin status SELECT plugin_name, plugin_status FROM information_schema.plugins WHERE plugin_name = 'validate_password'; -- Uninstall the plugin UNINSTALL PLUGIN validate_password; -- Install the component replacement INSTALL COMPONENT 'file://component_validate_password'; -- Verify SELECT * FROM mysql.component WHERE component_urn LIKE '%validate_password%';

Pemberitahuan

Precheck berikut menghasilkan pemberitahuan ketika precheck gagal, tetapi upgrade dapat dilanjutkan.

InvalidPrivileges

Tingkat precheck: Pemberitahuan

Memeriksa hak pengguna yang akan dihapus

Precheck ini mengidentifikasi akun pengguna dengan hak istimewa yang sedang dihapus atau dimodifikasi di MySQL 8.4. Hak SET_USER_ID istimewa sedang dihapus sebagai bagian dari proses peningkatan. Jika hak istimewa tidak digunakan, tidak ada tindakan yang diperlukan. Jika tidak, pastikan mereka berhenti digunakan sebelum upgrade karena mereka akan hilang.

Contoh keluaran:

{ "id": "invalidPrivileges", "title": "Checks for user privileges that will be removed", "status": "OK", "description": "Verifies for users containing grants to be removed as part of the upgrade process.", "detectedProblems": [ { "level": "Notice", "dbObject": "'test_user'@'localhost'", "description": "The user 'test_user'@'localhost' has the following privileges that will be removed as part of the upgrade process: SET_USER_ID" } ] }

Resolusi:

Ini adalah pemberitahuan informasional — tidak ada tindakan yang diperlukan. Hak SET_USER_ID istimewa akan dihapus secara otomatis selama proses peningkatan.

Namun, jika aplikasi Anda bergantung pada SET_USER_ID hak istimewa, tinjau dan perbarui aplikasi Anda sebelum memutakhirkan.

Kesalahan, peringatan, atau pemberitahuan

Precheck berikut dapat mengembalikan kesalahan, peringatan, atau pemberitahuan tergantung pada output precheck.

autentikasi MethodUsage

Tingkat precheck: Kesalahan, Peringatan, atau Pemberitahuan

Periksa metode otentikasi pengguna yang tidak digunakan lagi atau tidak valid

Precheck ini mengidentifikasi akun pengguna menggunakan metode otentikasi yang tidak digunakan lagi atau akan dihapus di MySQL 8.4. Plugin mysql_native_password otentikasi tidak digunakan lagi dan dinonaktifkan secara default pada MySQL 8.4.0. Plugin ini dapat dihapus dalam versi future.

Tingkat keparahan bersifat dinamis berdasarkan siklus hidup fitur—Pemberitahuan sebelum penghentian, Peringatan setelah penghentian, Kesalahan setelah penghapusan.

Contoh keluaran:

{ "id": "authMethodUsage", "title": "Check for deprecated or invalid user authentication methods.", "status": "OK", "description": "Some users are using authentication methods that may be deprecated or removed, please review the details below.", "detectedProblems": [ { "level": "Warning", "dbObject": "testuser@localhost", "description": "" } ] }

Resolusi:

Perbarui akun pengguna untuk menggunakan caching_sha2_password otentikasi:

ALTER USER 'username'@'host' IDENTIFIED WITH caching_sha2_password BY 'new_password';
catatan

Tidak ada tindakan yang diperlukan untuk akun sistem internal Aurora. Mereka diperbarui secara otomatis selama proses peningkatan. Mencoba memodifikasi akun ini secara manual dapat menyebabkan masalah dengan fungsionalitas Aurora.

PluginPenggunaan

Tingkat precheck: Kesalahan, Peringatan, atau Pemberitahuan

Periksa penggunaan plugin yang tidak digunakan lagi atau dihapus

Precheck ini mengidentifikasi plugin yang telah usang atau dihapus di MySQL 8.4. Ini memeriksa semua plugin aktif dan melaporkan status penghentian mereka. Tingkat keparahan bersifat dinamis berdasarkan siklus hidup fitur.

Contoh keluaran:

{ "id": "pluginUsage", "title": "Check for deprecated or removed plugin usage.", "status": "OK", "description": "The following plugins are ACTIVE and they have been deprecated or removed.", "detectedProblems": [ { "level": "Error", "dbObject": "keyring_file", "description": "The 'keyring_file' plugin is removed as of MySQL 8.4.0. It must not be used anymore, please use the 'component_keyring_file' component instead." } ] }

Resolusi:

Copot pemasangan plugin yang tidak digunakan lagi dan instal penggantian komponennya:

-- Check installed plugins SELECT plugin_name, plugin_status FROM information_schema.plugins WHERE plugin_name IN ('keyring_file', 'keyring_encrypted_file', 'keyring_oci', 'authentication_fido'); -- Uninstall and replace (example for keyring_file) UNINSTALL PLUGIN keyring_file; INSTALL COMPONENT 'file://component_keyring_file'; -- Verify SELECT * FROM mysql.component WHERE component_urn LIKE '%keyring%';

Tabel berikut mencantumkan plugin usang dan penggantinya:

Plugin Pengganti
keyring_file component_keyring_file
keyring_encrypted_file component_keyring_encrypted_file
keyring_oci component_keyring_oci
authentication_fido authentication_webauthn
periksa TableCommand

Tingkat precheck: Kesalahan, Peringatan, atau Pemberitahuan

Masalah yang dilaporkan oleh check table x for upgrade perintah

Precheck ini menjalankan CHECK TABLE ... FOR UPGRADE perintah pada semua tabel pengguna untuk mengidentifikasi masalah struktural, fitur usang, atau ketidakcocokan dengan MySQL 8.4. Perintah melakukan validasi komprehensif struktur tabel dan metadata.

Tidak seperti prechecks lainnya, ini dapat mengembalikan kesalahan, peringatan, atau pemberitahuan tergantung pada CHECK TABLE output. Jika precheck ini mengembalikan tabel apa pun, tinjau dengan hati-hati bersama dengan kode pengembalian dan pesan sebelum memulai pemutakhiran.

Contoh keluaran:

{ "id": "checkTableCommand", "title": "Issues reported by 'check table x for upgrade' command", "status": "OK", "description": "Issues reported by 'check table x for upgrade' command", "detectedProblems": [ { "level": "Error", "dbObject": "test.orphaned_view", "description": "View 'test.orphaned_view' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them" }, { "level": "Error", "dbObject": "test.orphaned_view", "description": "Corrupt" } ] }

Resolusi:

Tinjau objek yang dilaporkan dan perbaiki atau hapus sebelum memutakhirkan. Masalah umum meliputi:

  • Tampilan yang mereferensikan tabel atau kolom yang tidak valid—jatuhkan atau buat ulang tampilan.

  • Tabel korup—jalankan REPAIR TABLE atau buat ulang tabel.

  • Pemicu dengan CREATED atribut yang hilang—buat kembali pelatuknya.

Untuk informasi selengkapnya, lihat pernyataan CHECK TABLE dalam dokumentasi MySQL.