MySQL V8で認証プラグイン’caching_sha2_password’をロードできない時の回避策

症状

MySQLのバージョン8.0以降を使用して、Exploratoryからデータベースに接続しようとすると、次のようなエラーが表示される場合があります。

Failed to connect to abcdefghijk
Error in .local(drv, ...) : Failed to connect to database: Error: Plugin caching_sha2_password could not be loaded: The specified module could not be found.

回避策

mysql_native_passwordを使用する

回避策として、以下のSQLコマンドを外部ツール(MySQL Workbenchなど)を使って実行することで、V8のデフォルトのcacheing_sha2_passwordの代わりに、mysql_native_passwordを使用できます。

その際、<username>と<password> を実際のユーザー名とパスワ ードに置き換えてください。

ALTER USER '<username>' IDENTIFIED WITH mysql_native_password BY '<password>';

英語となりますが、Stackoverflowにて認証プラグインの’caching_sha2_password’をロードできない問題の詳細を確認することができます。