To connect to the server following data directory initialization, you must therefore use a client or connector that supports caching_sha2_password. If you can do this but prefer that the not_user_root account use mysql_native_password after installation, install MySQL and initialize the data directory as you normally would. Then connect to the server as root and use ALTER USER as follows to change the account authentication plugin and password:
ALTER USER 'not_user_root'@'localhost'
IDENTIFIED WITH mysql_native_password
BY 'password';
If the client or connector that you use does not yet support caching_sha2_password, you can use a modified data directory-initialization procedure that associates the not_user_root account with mysql_native_password as soon as the account is created. To do so, use either of these techniques:
Supply a –default-authentication-plugin=mysql_native_password option along with –initialize or –initialize-insecure.
Set default_authentication_plugin to mysql_native_password in an option file, and name that option file using a –defaults-file option along with –initialize or –initialize-insecure. (In this case, if you continue to use that option file for subsequent server startups, new accounts will be created with mysql_native_password rather than caching_sha2_password unless you remove the default_authentication_plugin setting from the option file.)
https://dev.mysql.com/doc/refman/8.0/en/upgrading-from-previous-series.html#upgrade-caching-sha2-password
(WordPress 5.3 have support for php 7.4) From php 7.4 MYSQL Native Driver (MYSQLND) there should be support for the connector, also with caching_sha2_password
https://github.com/php/php-src/commit/4f06e67ad2201390ed35a9ea6288a00c0b04782b#commitcomment-32356655
For plug-in PAM https://www.ads-software.com/support/topic/mariadb-authentication-does-not-work-when-mariadb-is-integrated-with-pamldap/
-
This reply was modified 4 years, 11 months ago by autotutorial.