MySQL Character set problem error code: 1267 Illegal mix of collations (utf8_general_ci,implicit) and (utf8_croatian_ci,implicit) for operation ' ='

Source: Internet
Author: User

The problem is usually caused by multiple table or cross-Library table queries because the character set of the two tables is not the same, so why are the character sets of the two tables different? This is due to the fact that the architect or developer accidentally chose the wrong character set when the table was being constructed.

Well, let's change the character set of the two tables (or the two tables associated with the two libraries) to be the same, yes, we changed the hair, found that the abnormal MySQL is still the same error!!!

I looked up some information on the internet and said it felt very full, but too theoretical and not practical (just to solve the problem).

According to the above analysis we would like to change the character set of the two tables to be the same for the purpose, and then I wonder if there is a concept of a character set in the field, but it is abhorrent that the tool does not display the character set of the field (because the character set is based on the character set of the table).

And then I was thinking that MySQL is stored in the form of a file, is it not the character set before the change of the content or the character set before the save?

We use this command

SHOW CREATE table ' name ';

Look, it turns out that the set of characters for the associated column name is not the same as the current character set, so it's easy to force this field to change to the current default character set by means of a command.

ALTER table ' table name ' Change ' column name ' column name ' VARCHAR (CHARACTER set UTF8 DEFAULT NULL COMMENT ' comment ';

OK, so simple, please leave a message to solve the problem.

MySQL Character set problem error code: 1267 Illegal mix of collations (utf8_general_ci,implicit) and (utf8_croatian_ci,implicit) for operation ' ='

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.