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;