mysql提示:Illegal mix of collations for operation ‘UNION’

时间:2014-04-25 16:31:41   收藏:0   阅读:1659

http://www.111cn.net/database/mysql/56096.htm

show variables like "%char%";

show variables like "%coll%";

 

然后将数据库中所有编码方式改为统一:

 

 代码如下 复制代码


mysql> set character_set_database=utf8;

Query OK, 0 rows affected (0.00 sec)

 

mysql> set collation_database= utf8_general_ci

重新查看字符集及数据表字段编码字符是否一致:


总结

utf8_bin
utf8_general_ci
utf8_unicode_ci

utf8_bin 与 utf8_general_ci 可以

utf8_bin 与 utf8_unicode_ci 可以

utf8_general_ci 与 utf8_unicode_ci 不可以

 

 

 

 

 

 

 

 

 

 

 

mysql提示:Illegal mix of collations for operation ‘UNION’,布布扣,bubuko.com

原文:http://www.cnblogs.com/google4y/p/3687901.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!