音乐分享(自动连播):
So cold
Not my baby
Wicked Game
What Is Love
Once Upon a Time
The Heart Of The Ocean
靳闯博客 记录是一种习惯 、分享是一种态度
SQLSTATE[HY000]: General error: 1267 Illegal mix of collations (utf8_general_ci,IMPLICIT) and (utf8mb4_general_ci,COERCIBLE) for operation 'like'
发表于 - | 分类 - 技术积累 | 标签 - Mysql

程序在采集数据遇到的,属于个别情况,众多条数据中,只有某一条数据出现此了错误
SQLSTATE[HY000]: General error: 1267 Illegal mix of collations (utf8_general_ci,IMPLICIT) and (utf8mb4_general_ci,COERCIBLE) for operation 'like'

说明: php程序 | mysql数据库,首先查看表中的情况是否有两种规则

解决方法:统一下下表的排序规则

ALTER TABLE my_table CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
或者
ALTER TABLE my_table CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;

本站文章除注明[转载|引用|原文]出处外,均为本站原生内容,转载前请注明出处 | 文章链接地址:https://me.jinchuang.org/archives/1331.html

如果这篇文章帮助到了你,我感到十分荣幸!

记录 🐾 分享 👣 进步 💪 变强


留言

顶部