Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/mysql/67.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python Django非法混合排序规则_Python_Mysql_Django_Mysql Python - Fatal编程技术网

Python Django非法混合排序规则

Python Django非法混合排序规则,python,mysql,django,mysql-python,Python,Mysql,Django,Mysql Python,django尝试将数据库与另一个外部crm同步时,会引发错误: OperationalError(1267, "Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '='") 我试着跑 ALTER TABLE table_name CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;

django尝试将数据库与另一个外部crm同步时,会引发错误:

OperationalError(1267, "Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '='")
我试着跑

ALTER TABLE table_name CONVERT TO CHARACTER SET utf8 COLLATE     utf8_general_ci;
没有结果。 还创建了cnf文件:

[client]
default-character-set=utf8
[mysqld]
character_set_client=utf8
character_set_server=utf8
collation_server=utf8_unicode_ci
并添加到conf中

  'OPTIONS': {
        'read_default_file': 'full path to cnf file'
    }
但它也没有结果