Illegal table mix of collation(latin1_swedish_ci,IMPLICIT)and(utf8mb4_general_ci,CORECIBLE)for prera

Unhandled Exception: MySql.Data.MySqlClient.MySqlException: Illegal table  mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8mb4_general_ci,COERCIBLE) for operation '=' 

原因是编码格式不统一造成的。

解决办法:将不同的字符集,转化成统一的字符集:

ALTER table tableName CONVERT TO CHARACTER SET utf8_unicode_ci;

https://stackoverflow.com/questions/19694741/django-illegal-mix-of-collations-latin1-swedish-ci-implicit-and-utf8-general

你可能感兴趣的:(MYSQL)