mysql提示:Illegal mix of collations for operation ‘UNION’
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’的更多相关文章
- MySQL Error: Illegal mix of collations for operation 'concat'
在使用concat连接字符串时出现错误:MySQL Error: Illegal mix of collations for operation 'concat' 原因:字段操作默认为UTF8的编码, ...
- myslq数据库用union all查询出现 #1271 - Illegal mix of collations for operation 'UNION'
出现 #1271 - Illegal mix of collations for operation 'UNION' 的原因是两个字符编码不匹配造成的. 我遇到的是 utf8_general_ci ...
- mysql 客户端连接报错Illegal mix of collations for operation
服务端用的是utf-8,客户端工具打开表和视图是会报Illegal mix of collations for operation错误,经排查,可以采用以下语句解决 SET character_set ...
- 彻底解决phpcms v9升级后,文章发布出现: Mysql 1267错误:MySQL Error : Illegal mix of collations 解决办法
彻底解决phpcms v9升级后,文章发布出现: MySQL Query : SELECT * FROM `withli_a`.`v9_keyword` WHERE `keyword` = '吼吼' ...
- Illegal mix of collations for operation 'concat'
在t_employee表中,练习使用concat函数连接字符串时, mysql> select concat('工号为:',fnumber,'的员工的幸福指数:',fsalary/(fage-2 ...
- mysql5.6修改字符编码,ERR:Illegal mix of collations for operation 'concat'
mysql5.6修改字符编码,ERR:Illegal mix of collations for operation 'concat' 1.问题起因:搭建环境初始化mysql的时候看到mysql配置文 ...
- Illegal mix of collations for operation 'like' while searching with Ignited-Datatables
Stack Overflow Questions Developer Jobs Tags Users Log In Sign Up Join Stack Overflow to learn, sh ...
- 错误之Illegal mix of collations for operation 'like'
内容来自博客:https://www.cnblogs.com/install/p/4417527.html MySQL Illegal mix of collations for operation ...
- MySQL replication illegal mix of collations
MySQL replication case 一则 转载:http://www.vmcd.org/2013/09/mysql-replication-case-%E4%B8%80%E5%88%99/ ...
随机推荐
- python中xrange和yield的用法
相信很多人对xrange和yield都不是很清楚,网上很多文章也是写的云里雾里的,今天我用最简单的例子给大家说下. 说起xrange的时候就一定要提range,其实xrange 用法与 range 完 ...
- seajs加载jquery时提示$ is not a function该怎么解决
这篇文章主要介绍了seajs加载jquery时提示$ is not a function该怎么解决的相关资料,需要的朋友可以参考下 jquery1.7以上的都支持模块化加载,只是jquery默认的是支 ...
- android: SQLite升级数据库
如果你足够细心,一定会发现 MyDatabaseHelper 中还有一个空方法呢!没错,onUpgrade() 方法是用于对数据库进行升级的,它在整个数据库的管理工作当中起着非常重要的作用,可 千万不 ...
- linux-impdp的使用
数据库是在linux服务器上,需要用impdp方式导入一个dmp,用root用户登录该数据库服务器后,直接采用impdp命令执行导入操作,提示:KSH:impdp:not found.经查原来是操作的 ...
- Windows8和CentOS6.4(64)双系统硬盘安装(图文)【转】
原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出处 .作者信息和本声明.否则将追究法律责任.http://asange.blog.51cto.com/7125040/1193980 最近在 ...
- count有关
1.count有两个作用:统计某个字段有值的记录数:统计结果集的记录数.2.count括号内的表达式不为null,就是统计结果集的记录数.也就是说,count(1),count(*),count(10 ...
- memcached命令
memcached相对于redis来说,简直简单太多,命令也少很多,一般应用都是使用redis,但了解一下也还是不错的. 具体命令和用法很参见:http://www.runoob.com/memcac ...
- Why restTemplate.put() throws “HttpClientErrorException: 404 Not Found”
I make a put request RestTemplate restTemplate = new RestTemplate(); restTemplate.put(new URI(&quo ...
- nlog(n)解动态规划--最长上升子序列(Longest increasing subsequence)
最长上升子序列LIS问题属于动态规划的初级问题,用纯动态规划的方法来求解的时间复杂度是O(n^2).但是如果加上二叉搜索的方法,那么时间复杂度可以降到nlog(n). 具体分析参考:http://b ...
- iOS开发——iOS学习路线
iOS学习路线 版权声明:欢迎转载,请贴上源地址:http://www.cnblogs.com/iCocos/(iOS梦工厂) 一:自学初步学习路线 二:高级完整学习路线 三:完整知识与能力体系 思维 ...