I have actually changed the collations of my tables to utf8_general_ci
in mysql but it appears that it is still recognized as latin1 because I got this
Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8mb4_general_ci,COERCIBLE) for operation '=': SELECT
dimensions
.* FROMdimensions
WHEREdimensions
.name
= '责任心' ANDdimensions
.category
= '态度项' LIMIT 1
I don't write mysql query but I call someones code to generate one and execute it. And I used this statement to change the collation:
ALTER table participants CHARACTER SET utf8 COLLATE utf8_general_ci;
And I also found out that I used the wrong collation instead of the correct one utf8mb4_general_ci
. So I try to alter it by using.
ALTER table participants CHARACTER SET utf8 COLLATE utf8mb4_general_ci;
But I got this error
Error Code: 1253. COLLATION 'utf8mb4_general_ci' is not valid for CHARACTER SET 'utf8
How can I fix it?
---Update---
Now all my tables are using utf8mb4_general_ci
but I still get the same error Illegal mix of collations
.
I used show table status
to see the collations of my table.