php7.0連接mysql8.0報錯:The server requested authentication method unknown to the client
是因為mysql80使用了新的密碼驗證插件:caching_sha2_password,而在php7.0並不支持這種方式。
解決辦法:
1.升級php
2.修改mysql的配置文件,my.ini
找到mysqlId下的default-authentication-plugin配置項修改其值為mysql_native_password
重啟mysql即可。