解决Illegal mix of collations (gb2312_chinese_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operati

来源:互联网 发布:清理mac系统垃圾软件 编辑:程序博客网 时间:2024/05/16 18:18
在sql语句执行之前加上这一句:
set names 'utf8';

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