Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Illegal mix of collations (utf8_general_ci,IMPLICIT) and (utf8_unicode_ci,IMPLICIT) for operation '=' in MySQL Stored Procedure

I checked the database table and found it was in latin1_swedish_ci so i've changed it to utf8_general_ci then I changed the collation from latin1_swedish_ci to utf8_general_ci for all the fields.

Still it's giving me the same error.

Illegal mix of collations (utf8_general_ci,IMPLICIT) and (utf8_unicode_ci,IMPLICIT) for operation '='

Thanks,

like image 573
Nikhil Avatar asked Mar 22 '12 09:03

Nikhil


2 Answers

so the answer is simple. It seems you missed the change as stated by MKJ ^^ but the actual syntax to alter your tables looks like this.

alter table `dbname`.`tablename` convert to character set utf8 collate utf8_general_ci;

Applied as an individual script or at the end of your create table statement you should be able to relate all related tables back to the same charset

like image 193
Hituptony Avatar answered Oct 25 '22 06:10

Hituptony


COLLATE utf8_unicode_ci

add to the query end, like this;

SELECT * FROM table COLLATE utf8_unicode_ci;
like image 29
aliozkara Avatar answered Oct 25 '22 07:10

aliozkara