3988 Conversion from collation utf8_general_ci into utf8mb4_0900_ai_ci impossible for parameter

PHP错误信息:

[10501]SQLSTATE[HY000]: General error: 3988 Conversion from collation utf8_general_ci into utf8mb4_0900_ai_ci impossible for parameter

错误原因:

表情包保存到数据库报错

解决方案:

1、PHP代码的数据库编码配置改成utf8mb4

2、MySQL数据表编码改成 CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci

你可能感兴趣的:(PHP,MySQL,emoji,utf8_general_ci,utf8mb4,表情,mysql)