View a markdown version of this page

Aurora MySQL バージョン 3 からバージョン 8.4 へのアップグレードに関する事前チェックの説明 - Amazon Aurora

Aurora MySQL バージョン 3 からバージョン 8.4 へのアップグレードに関する事前チェックの説明

次の事前チェックは、Aurora MySQL バージョン 3 (MySQL 8.0 互換) から Aurora MySQL バージョン 8.4 (MySQL 8.4 互換) にアップグレードするときに実行されます。これらの事前チェックでは、アップグレードを開始する前に潜在的な互換性の問題を特定します。

エラー

次の事前チェックは、事前チェックが失敗し、アップグレードを続行できない場合にエラーを生成します。

エラーを報告する MySQL の事前チェック

次の事前チェックは、コミュニティ MySQL から提供されています。

deprecatedRouterAuthMethod

事前チェックレベル: Error

MySQL Router の内部アカウントで使用されている非推奨または無効な認証方法を確認する

この事前チェックでは、MySQL Router の内部アカウントが、MySQL 8.4 で削除または変更される可能性のある、非推奨または無効な認証方法を使用していないことを確認します。MySQL Router アカウントは、Router が既存のアカウントを使用するように指示されていない場合、ブートストラップ時に自動的に作成されます。

出力の例:

{ "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." } ] }

mysql_router_test アカウントが mysql_native_passwordsha256_password などの非推奨の認証方法を使用しているため、事前チェックはエラーを返します。

使用中の認証方法を検証するには。

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

解決策:

caching_sha2_password 認証を使用するように MySQL Router アカウントを更新します。

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

または、MySQL Router を最新バージョンにアップグレードして、廃止された認証方法が使用されないようにします。バージョン 8.0.19 以降では、AdminAPI を使用して作成された専用アカウントを使用するように MySQL Router に指示することもできます。

partitionsWithPrefixKeys

事前チェックレベル: Error

プレフィックスキーインデックスを持つ列を使用してキーでパーティションをチェックする

この事前チェックでは、パーティションキーにプレフィックスキーインデックスを持つ列を使用するパーティションテーブルを識別します。列プレフィックスのインデックスはキーパーティショニングではサポートされていません。パーティション関数では無視され、MySQL 8.4.0 では許可されません。

詳細については、MySQL ドキュメントの「パーティショニングに関する制約と制限」を参照してください。

出力の例:

{ "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." } ] }

解決策:

-- 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

事前チェックレベル: Error

列定義のエラーをチェックする

この事前チェックでは、すべての列定義が MySQL 8.4 の要件と互換性があることを検証します。これは、AUTO_INCREMENT フラグが設定されている FLOAT または DOUBLE タイプの列を具体的に識別しますが、MySQL 8.4 ではサポートされなくなりました。

出力の例:

{ "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." } ] }

解決策:

列タイプを FLOAT または DOUBLE から整数型に変更します。

-- 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 の事前チェック

次の事前チェックは、Aurora MySQL に固有のものです。

auroraUnsupportedPluginsCheck

事前チェックレベル: Error

サポートされていないプラグインを確認する

この Aurora 固有の事前チェックでは、Aurora MySQL バージョン 8.4 でサポートされていないプラグインを識別します。Aurora には、コミュニティ MySQL とは異なる独自のプラグイン互換性要件があります。

出力例:

{ "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." } ] }

解決策:

サポートされていないプラグインをアンインストールします。

UNINSTALL PLUGIN plugin_name;
auroraUnsupportedComponentsCheck

事前チェックレベル: Error

サポートされていないコンポーネントを確認する

この事前チェックでは、Aurora MySQL バージョン 8.4 でサポートされていない MySQL コンポーネントが現在インストールまたはアクティブになっていないことを確認します。コンポーネントはプラグインとは異なり、コンポーネントインフラストラクチャを通じて拡張機能を提供します。

出力の例:

{ "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." } ] }

解決策:

サポートされていないコンポーネントをアンインストールします。

UNINSTALL COMPONENT 'component_name';
auroraUpgradeCheckForSysSchemaObjectTypeMismatch

事前チェックレベル: Error

sys スキーマのオブジェクトタイプの不一致を確認する

この事前チェックでは、sys スキーマ内のすべてのオブジェクトに正しいオブジェクトタイプと定義があることを検証します。sys スキーマは、データベースのモニタリングと診断のためのビューと手順を提供するシステムスキーマです。スキーマを手動で変更または破損すると、不一致が発生する可能性があります。

出力の例:

{ "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)." } ] }

解決策:

-- 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;

警告

次の事前チェックは、事前チェックが失敗してもアップグレードを続行できるときに警告を生成します。

警告を報告する MySQL の事前チェック

次の事前チェックは、コミュニティ MySQL から提供されています。

deprecatedDefaultAuth

事前チェックレベル: Warning

システム変数で非推奨または無効なデフォルトの認証方法がないかを確認する

この事前チェックでは、default_authentication_plugin システム変数が非推奨の認証方法に設定されていないことを確認します。

重要

MySQL 8.4.0 は、廃止された default_authentication_plugin オプションを完全に削除します。MySQL 8.4.0 以降、mysql_native_password プラグインはデフォルトで無効になっており、将来のバージョンでは削除される可能性があります。

バージョン 8.4 での認証変更の詳細については、「Aurora MySQL バージョン 3 からバージョン 8.4 にアップグレードする際のセキュリティ上の考慮事項」を参照してください。

出力の例:

{ "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." } ] }

解決策:

caching_sha2_password を使用するように認証システム変数を更新します。

  1. Amazon RDS コンソールに移動し、[パラメータグループ] に移動します。

  2. DB クラスターパラメータグループを選択します。

  3. 以下のパラメータを変更します。

    • default_authentication_plugin = caching_sha2_password

    • authentication_policy = caching_sha2_password,*,

  4. 変更を適用します。再起動が必要になる場合があります。

この変更を行う前に、アプリケーションクライアントが caching_sha2_password 認証をサポートしていることを確認してください。一部の古い MySQL クライアントライブラリは、この認証方法をサポートしていない場合があります。

foreignKeyReferences

事前チェックレベル: Warning

完全な一意インデックスを参照していない外部キーをチェックする

この事前チェックは、すべての外部キー制約が、完全な一意インデックスまたはプライマリキーインデックスを参照していることを確認します。MySQL 8.4.0 では、部分インデックスへの外部キーは禁止されている場合があります。

出力の例:

{ "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'." } ] }

解決策:

アプリケーションに最適なオプションを選択します。

-- 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 の事前チェック

次の事前チェックは、Aurora MySQL に固有のものです。

auroraValidatePasswordPluginCheck

事前チェックレベル: Warning

廃止された validate_password プラグインを確認する

この事前チェックは、廃止された validate_password プラグインの使用を特定します。MySQL 8.0 以降では、validate_password 機能がコンポーネント (component_validate_password) として再実装されました。Aurora MySQL バージョン 8.4 では、コンポーネントベースの実装への移行が必要です。

詳細については、「パスワード検証コンポーネントの移行」を参照してください。

出力の例:

{ "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." } ] }

解決策:

-- 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%';

注意

次の事前チェックは、事前チェックに失敗してもアップグレードを続行できるときに通知を生成します。

invalidPrivileges

事前チェックレベル: Notice

削除されるユーザー権限をチェックする

この事前チェックでは、MySQL 8.4 で削除または変更される権限を持つユーザーアカウントを識別します。SET_USER_ID 権限はアップグレードプロセスの一環として削除されます。権限が使用されていない場合、アクションは必要ありません。それ以外の場合は、それらが失われるため、アップグレード前に使用を停止してください。

出力の例:

{ "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" } ] }

解決策:

これは情報提供のための通知であり、特に対応は必要ありません。SET_USER_ID 権限はアップグレードプロセス中に自動的に削除されます。

ただし、アプリケーションが SET_USER_ID 権限に依存している場合は、アップグレードする前にアプリケーションを確認して更新してください。

エラー、警告、または通知

次の事前チェックは、事前チェックの出力に応じてエラー、警告、または通知を返す場合があります。

authMethodUsage

事前チェックレベル: Error、Warning、または Notice

非推奨または無効なユーザー認証方法を確認する

この事前チェックでは、MySQL 8.4 で廃止または削除される認証方法を使用してユーザーアカウントを識別します。mysql_native_password 認証プラグインは、MySQL 8.4.0 以降、デフォルトで廃止および無効になっています。このプラグインは、将来のバージョンでは削除される可能性があります。

重要度レベルは、機能のライフサイクルに基づいて動的に変化します。廃止前は通知、廃止後は警告、削除後はエラーとなります。

出力の例:

{ "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": "" } ] }

解決策:

caching_sha2_password 認証を使用するようにユーザーアカウントを更新します。

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

Aurora 内部システムアカウントについては、アクションは必要ありません。これらはアップグレードプロセス中に自動的に更新されます。これらのアカウントを手動で変更しようとすると、Aurora の機能に問題が発生する可能性があります。

pluginUsage

事前チェックレベル: Error、Warning、または Notice

廃止または削除されたプラグインの使用状況を確認する

この事前チェックでは、MySQL 8.4 で廃止または削除されたプラグインを識別します。すべてのアクティブなプラグインを調べ、その非推奨ステータスを報告します。重要度レベルは、機能のライフサイクルに基づいて動的です。

出力の例:

{ "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." } ] }

解決策:

非推奨のプラグインをアンインストールし、置換コンポーネントをインストールします。

-- 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%';

次の表に、非推奨のプラグインとその置き換えを示します。

プラグイン 置換
keyring_file component_keyring_file
keyring_encrypted_file component_keyring_encrypted_file
keyring_oci component_keyring_oci
authentication_fido authentication_webauthn
checkTableCommand

事前チェックレベル: Error、Warning、または Notice

check table x for upgrade コマンドによって報告された問題

この事前チェックでは、すべてのユーザーテーブルで CHECK TABLE ... FOR UPGRADE コマンドを実行して、構造上の問題、廃止された機能、または MySQL 8.4 との非互換性を特定します。このコマンドは、テーブル構造とメタデータの包括的な検証を実行します。

他の事前チェックとは異なり、CHECK TABLE の出力に応じてエラー、警告、または通知を返すことがあります。この事前チェックでテーブルが返された場合は、アップグレードを開始する前に、それらをリターンコードとメッセージとともに慎重に確認してください。

出力の例:

{ "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" } ] }

解決策:

アップグレードする前に、報告されたオブジェクトを確認し、修正または削除します。一般的な問題は次のとおりです。

  • 無効なテーブルまたは列を参照するビューをドロップまたは再作成します。

  • テーブルの破損 - REPAIR TABLE を実行するか、テーブルを再作成します。

  • CREATED 属性が欠落しているトリガー - トリガーを再作成します。

詳細については、MySQL ドキュメントの「CHECK TABLE Statement」を参照してください。