1. [Error After:]
- When mysql database to perform multi-table join query:
select * from A LEFT JOIN B ON A.user_id = b.user_id
- An error occurred:
Illegal mix of collations (utf8_unicode_ci,IMPLICIT) and (utf8_general_ci,IMPLICIT)
That is probably inconsistent with encoding means encoding format of Table A and Table B can not be compared.
2. [Solution:]
The Table A and Table B (
collations
or校对规则
encoded) unified manner utf8_general_ciThen execute the following statement:
```mysql
alter table 表名convert to character set utf8 collate utf8_general_ci
```
note! ! !
This is generally done above step does not solve the problem, because the table inside the data before inserting it into, naturally before encoding utf8_unicode_ci
, so make the time to compare data is still being given! ! ! To solve the problem: also need to continue the implementation of the second step, the encoding rules are also unified data table correct them
(Also, note: the difference between utf8_general_ci and utf8_unicode_ci, the former fast calibration speed, but somewhat less accurate; the latter high accuracy, but the calibration slower.)