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’的更多相关文章

  1. MySQL Error: Illegal mix of collations for operation 'concat'

    在使用concat连接字符串时出现错误:MySQL Error: Illegal mix of collations for operation 'concat' 原因:字段操作默认为UTF8的编码, ...

  2. myslq数据库用union all查询出现 #1271 - Illegal mix of collations for operation 'UNION'

    出现 #1271 - Illegal mix of collations for operation 'UNION' 的原因是两个字符编码不匹配造成的. 我遇到的是  utf8_general_ci ...

  3. mysql 客户端连接报错Illegal mix of collations for operation

    服务端用的是utf-8,客户端工具打开表和视图是会报Illegal mix of collations for operation错误,经排查,可以采用以下语句解决 SET character_set ...

  4. 彻底解决phpcms v9升级后,文章发布出现: Mysql 1267错误:MySQL Error : Illegal mix of collations 解决办法

    彻底解决phpcms v9升级后,文章发布出现: MySQL Query : SELECT * FROM `withli_a`.`v9_keyword` WHERE `keyword` = '吼吼' ...

  5. Illegal mix of collations for operation 'concat'

    在t_employee表中,练习使用concat函数连接字符串时, mysql> select concat('工号为:',fnumber,'的员工的幸福指数:',fsalary/(fage-2 ...

  6. mysql5.6修改字符编码,ERR:Illegal mix of collations for operation 'concat'

    mysql5.6修改字符编码,ERR:Illegal mix of collations for operation 'concat' 1.问题起因:搭建环境初始化mysql的时候看到mysql配置文 ...

  7. 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 ...

  8. 错误之Illegal mix of collations for operation 'like'

    内容来自博客:https://www.cnblogs.com/install/p/4417527.html MySQL Illegal mix of collations for operation ...

  9. MySQL replication illegal mix of collations

    MySQL replication case 一则 转载:http://www.vmcd.org/2013/09/mysql-replication-case-%E4%B8%80%E5%88%99/ ...

随机推荐

  1. IOS设计模式浅析之简单工厂模式(SimpleFactory)

    概述 首先说明一下,简单工厂模式不属于23种GOF设计模式之一.它也称作静态工厂方法模式,是工厂方法模式的特殊实现.这里对简单工厂模式进行介绍,是为本系列后面的工厂方法和抽象工厂模式做一个引子. 定义 ...

  2. MyEclipse使用总结——在MyEclipse中设置jsp页面为默认utf-8编码

    在MyEclispe中创建Jsp页面,Jsp页面的默认编码是“ISO-8859-1”,如下图所示: 在这种编码下编写中文是没有办法保存Jsp页面的,会出现如下的错误提示: 因此可以设置Jsp默认的编码 ...

  3. Linux 中的grep命令单引号,不加任何参数以及双引号的作用

    单引号: 可以说是所见即所得:即将单引号内的内容原样输出,或者描述为单引号里面看到的是什么就会输出什么.单引号''是全引用,被单引号括起的内容不管是常量还是变量者不会发生替换. 双引号: 把双引号内的 ...

  4. BigDecimal除法运算出现java.lang.ArithmeticException: Non-terminating decimal expansion; no exact representable decimal result的解决办法

    BigDecimal除法运算出现java.lang.ArithmeticException: Non-terminating decimal expansion; no exact represent ...

  5. 查看Oracle数据库的用户名和密码

    运行 cmd 按如下输入命令 sqlplus / as sysdba ---------以sys登陆          超级用户(sysdba) alter user 用户名 account unlo ...

  6. IE11企业模式介绍及可用性评估

    什么是企业模式? 企业模式是可以在 Windows 8.1 和 Windows7 设备上的 Internet Explorer 11 上运行的一种兼容性模式,该模式允许网站使用已修改的浏览器配置来呈现 ...

  7. libev代码

    就是贴上来: ev.c: /* * libev event processing core, watcher management */ /* this big block deduces confi ...

  8. Mysql 如何设置字段自动获取当前时间

    应用场景: 1.在数据表中,要记录每条数据是什么时候创建的,不需要应用程序去特意记录,而由数据数据库获取当前时间自动记录创建时间: 2.在数据库中,要记录每条数据是什么时候修改的,不需要应用程序去特意 ...

  9. nodejs配置简单HTTP服务器

    1.介绍 http-server 是一个简单的零配置命令行HTTP服务器, 基于 nodeJs. 如果你不想重复的写 nodeJs 的 web-server.js, 则可以使用这个. 2.安装 npm ...

  10. 在Linq to Entity 中使用lambda表达式来实现Left Join和Join

    1.读取用户和部门两个表的左连接: var sg = db.Users.GroupJoin(db.Departments, u => u.DepartmentId, d => d.Depa ...