Illegal mix of collations (utf8mb4_general_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation

Illegal mix of collations (utf8mb4_general_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation

小天
2023-11-01 / 0 评论 / 939 阅读 / 搜一下 / 正在检测是否收录...

2022/01/01 15:01:34 [error] 27751#0: *92883 FastCGI sent in stderr: "PHP message: SQLSTATE[HY000]: General error: 1267 Illegal mix of collations (utf8mb4_general_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '='" while reading response header from upstream, client: ***.9.208.203, server: www.xtboke.com, request: "GET /message.html HTTP/2.0", upstream: "fastcgi://unix:/tmp/php-cgi-72.sock:", host: "www.xtboke.com"

第一步:如下
Illegal mix of collations (utf8mb4_general_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation

第二步:找到数据库配置文件database.php,做如下修改:
'charset' => 'utf8mb4'

7

评论 (0)

打卡
取消