mysql 1267 error

Posted moss_tan_jun

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了mysql 1267 error相关的知识,希望对你有一定的参考价值。

CREATE TABLE a (
id VARCHAR(32)
) DEFAULT CHARSET = utf8 COLLATE utf8_general_ci;
INSERT INTO a(id) VALUES(‘a‘);

CREATE TABLE b (
id VARCHAR(32)
) DEFAULT CHARSET = utf8 COLLATE utf8_general_ci;
INSERT INTO b VALUES(‘b‘);

CREATE TABLE c (
id VARCHAR(32)
) DEFAULT CHARSET = utf8 COLLATE utf8_unicode_ci;
INSERT INTO c VALUES(‘c‘);

SELECT DISTINCT a.id,b.id FROM a,b WHERE a.id=b.id ORDER BY a.id DESC,b.id DESC;


SELECT CONCAT(‘ALTER TABLE ‘,‘c‘,‘ CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;‘) FROM information_schema.TABLES WHERE TABLE_SCHEMA=‘test001‘;

ALTER TABLE c CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;

SELECT DISTINCT a.id,b.id,c.id FROM a,b,c WHERE a.id=b.id AND b.id=c.id ORDER BY a.id DESC,b.id DESC,c.id DESC;

以上是关于mysql 1267 error的主要内容,如果未能解决你的问题,请参考以下文章

mysql字符集问题 错误代码: 1267 Illegal mix of collations (utf8_general_ci,IMPLICIT) and (utf8_croatian_ci,IM

Mysql'从存储引擎得到错误-1'错误

Mysql - 无法连接未知数据库'databasename'错误

Mysql - 无法连接未知数据库'databasename'错误

Joomla 更新失败。错误 1267 排序规则的非法混合

1267 老鼠的旅行