PHP 7.3.4不支持caching_sha2_password

时间:2019-04-27 03:22:21

标签: php symfony mysqli

我在symfony3项目中遇到了这个问题:

PDO::__construct(): The server requested authentication method unknown to the client [caching_sha2_password]

众所周知:issueissueissue等。它甚至是PHP网站there上的文档:

When running a PHP version before 7.1.16, or PHP 7.2 before 7.2.4, set MySQL 8 Server's default password plugin to mysql_native_password

这就是为什么我麻烦安装phpbrew,通过它安装php-7.3.4,将其设置为默认值的原因。但是,当我运行php -r 'phpinfo();' | grep auth_时。我看到这个结果:

Loaded plugins => mysqlnd,debug_trace,auth_plugin_mysql_native_password,auth_plugin_mysql_clear_password,auth_plugin_sha256_password

PDO::__construct()错误当然没有改变。我不知道为什么caching_sha2_password。那么为什么安装php-7.3.4并没有什么改变呢?

0 个答案:

没有答案