Plugin 'mysql_native_password' is not supported in sql version 8.0.4+ and needs to be replaced with 'caching_sha2_password'
Bug Report
- [x] Yes, I reviewed the contribution guidelines.
- [x] Yes, more specifically, I reviewed the guidelines on how to write clear bug reports.
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