SQLSTATE[HY000] [2054] Server sent charset unknown to the client. Please, report to the developers

wdzsjl 1个月前 (10-10) 阅读数 14 #Typecho

问题描述:thinkphp数据库配置'charset' =>'utf8mb4'连接mysql,报如下错误

SQLSTATE[HY000] [2054] Server sent charset unknown to the client. Please, report to the developers

解决方法:在mysql服务器配置文件中[mysqld]的下面添加

character-set-server = utf8mb4 collation-server = utf8mb4_unicode_ci
wx.jpg ywfw.jpg
热门