На днях решил попробовать MySQL 8, но при подключении из PHP получил ошибку. Погуглил, нашел советы по исправлению на StackOverflow и в различных блогах - слепое выполнение найденных инструкции исправило ситуацию, подключение заработало, но это не наш путь! Надо разобраться, что собственно происходит и как правильно поступить? - https://mysqlserverteam.com/mysql-8-0-4-new-default-authentication-plugin-caching\_sha2\_password/ - https://bugs.php.net/bug.php?id=76651 - http://databaseblog.myname.nl/2018/02/how-cachingsha2password-leaks-passwords.html - http://mysqlblog.fivefarmers.com/2015/08/31/protecting-mysql-passwords-with-sha256\_password-plugin/ Результаты подключения к MySQL 8.0.13 из различных версий PHP для двух различных пользователей (mysql_native_password и cached_sha2_password) при значении по умолчания default-authentication-plugin=cached_sha2_password ===================================== PHP 7.2.5: - user_mysql_native: success - user_cached_sha2: The server requested authentication method unknown to the client [caching_sha2_password] PHP 7.2.9: - user_mysql_native: Unexpected server respose while doing caching_sha2 auth: 109 - user_cached_sha2: success PHP 7.3.0RC5 - user_mysql_native: success - user_cached_sha2: The server requested authentication method unknown to the client [caching_sha2_password] Результаты подключения к MySQL 8.0.13 из различных версий PHP для двух различных пользователей (mysql_native_password и cached_sha2_password) при значении default-authentication-plugin=mysql_native_password =================================================== PHP 7.2.5: - user_mysql_native: success - user_cached_sha2: The server requested authentication method unknown to the client [caching_sha2_password] PHP 7.2.9 - user_mysql_native: success - user_cached_sha2: success PHP 7.3.0RC5 - user_mysql_native: success - user_cached_sha2: The server requested authentication method unknown to the client [caching_sha2_password] Пятиминутка PHP - подкаст о новостях из мира PHP, интересных постах в блогах и современных подходах к разработке. https://5minphp.ru