ideas icon indicating copy to clipboard operation
ideas copied to clipboard

Plugin 'mysql_native_password' is not supported in sql version 8.0.4+ and needs to be replaced with 'caching_sha2_password'

Open aaln opened this issue 1 year ago • 0 comments

Bug Report

Describe the current, buggy behavior

When running composer prepare-tests within wp-cli or wp-cli-dev, I receive this error trace describing Plugin mysql_native_password is not loaded. mysql_native_password is no longer supported in mysql versions 8.0.4+ and the plugin needs to be replaced with caching_sha2_password dev.mysql.com source

> install-package-tests
Checking if MySQL is ready...
Detected MySQL at version 9.0
+ mysql -e 'CREATE DATABASE IF NOT EXISTS `wp_cli_test`;' -uroot ''
+ mysql -e 'CREATE USER IF NOT EXISTS `wp_cli_test`@'\''%'\'' IDENTIFIED WITH mysql_native_password BY '\''password1'\''' -uroot ''
ERROR 1524 (HY000) at line 1: Plugin 'mysql_native_password' is not loaded

Describe how other contributors can replicate this bug You can replicate this bug, by running composer prepare-tests within the wp-cli or wp-cli-dev repositories.

Describe what you would expect as the correct outcome

The

Let us know what environment you are running this on

mysql version 9.0 but the same occurs in sql versions from 8.0.4.

Provide a possible solution

Replace mysql_native_password with caching_sha2_password

aaln avatar Sep 17 '24 18:09 aaln