django-数据库迁移-Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE
Django数据库迁移报错:1267, "Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '='"
原因是在创建数据库时没有指定编码utf8
正确的创建数据库语句是
create database test_databases charset=utf8;
如果上一步忘记了指定编码,会有如上报错,解决方案:
alter table tablename convert to character set utf8;
python 中文名:蟒蛇,设计者:Guido van Rossum