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_passworddev.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
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 Pluginmysql_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 withcaching_sha2_password
dev.mysql.com sourceDescribe 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
withcaching_sha2_password