php连接mysql8.0时,遇到这样的报错
Server sent charset (255) unknown to the client. Please, report to the developers
解决方法:
在配置文件my.cnf
增加
[mysqld]
character-set-server = utf8
default-authentication-plugin=mysql_native_password
然后重启mysql服务即可
systemctl restart mysqld