Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Illegal mix of collations (utf8mb4_unicode_ci,IMPLICIT) and (utf8mb4_general_ci,IMPLICIT) for operation '='

I got this error;

Illegal mix of collations (utf8mb4_unicode_ci,IMPLICIT) and (utf8mb4_general_ci,IMPLICIT) for operation '='

I changed "Collations" to "utf8mb4_unicode_ci". Then tables were truncated and I re-import rows again. But still getting same error

like image 326
Michael42 Avatar asked May 17 '17 14:05

Michael42


1 Answers

I am guessing you have different collations on the tables you are joining. It says you are using an illegal mix of collations in operations =.

So you need to set collation. For example:

WHERE tableA.field COLLATE utf8mb4_general_ci = tableB.field

Then you have set the same collations on the = operation.

Since you have not provided more info about the tables this is the best pseudo code I can provide.

like image 77
MrApnea Avatar answered Oct 01 '22 03:10

MrApnea