Illegal mix of collations (gb2312_chinese_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation 'like'

来源:互联网 发布:async for python 编辑:程序博客网 时间:2024/05/16 12:41
解决方法:
在sql语句执行之前加上这一句:
set names 'utf8';

这一句话的意思相当于下面的三句指令:
  SET character_set_client = utf8;
  SET character_set_results = utf8;
  SET character_set_connection = utf8;