08-01
22

Illegal mix of collations (utf8_bin,IMPLICIT) and (latin1_swedish_ci,COERCIBLE)

错误如下:
引用内容 引用内容
General error,  message from server: "Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation 'like'"

编码问题,一个表是latin1字符集的,而传进的参数是UTF-8的,所以需要统一字符集,指令如下:
mysql> Alter   TABLE   suggest   CONVERT   TO   CHARACTER   SET   utf8;
Query OK, 98 rows affected (0.05 sec)
Records: 98  Duplicates: 0  Warnings: 0


文章来自: 本站原创
引用通告: 查看所有引用 | 我要引用此文章
Tags: latin1 UTF8 Illegal mix
相关日志:
评论: 0 | 引用: 0 | 查看次数: 1598
发表评论
昵 称:
密 码: 游客发言不需要密码.
内 容:
验证码: 验证码
选 项:
虽然发表评论不用注册,但是为了保护您的发言权,建议您注册帐号.
字数限制 1000 字 | UBB代码 开启 | [img]标签 关闭