Doing a simple table query as follows, an error message is displayed directly. It turns out that the character set is inconsistent. This article records the character set type of MySQL and the solution to the following problem select a.id, b.id from tt as a, t2 as b where a.xx = b.xx -- Illegal mix of collations (utf8mb4_unicode_ci,IMPLICIT) and (utf8mb4_general_ci,IMPLICIT) for operation '=' 1. SolutionLet's first look at the solution to the above problem. The easiest way to think of it is to unify the character sets of the two tables, either both are utf8mb4_general_ci or both are utf8mb4_unicode_ci. This problem will be naturally solved by unifying. What if I don't want to change the character set of the table? After all, in a production environment, doing this kind of operation is still risky. Here is a less elegant solution. Specify the character set after the field (you can specify all of them as utf8mb4_general_ci or all of them as utf8mb4_unicode_ci, just process it according to your actual needs) select a.id, b.id from tt as a, t2 as b where a.xx = b.xx collate utf8mb4_general_ci 2. MySQL character set Character SetFor domestic partners, generally speaking, our common character sets are the following three
MySQL actually supports more, which can be queried through show charset; Verification rulesIn actual cases, we often see the following
Of course, we can also view the supported validation rules through show collation; Please note the above wording
This is the end of this article about how to solve the abnormality of connecting tables caused by inconsistent MySQL character sets. For more related content about abnormality of connecting tables caused by inconsistent MySQL character sets, please search for previous articles on 123WORDPRESS.COM or continue to browse the related articles below. I hope you will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: A brief discussion on JavaScript scope
>>: Two special values in CSS are used to control the inherit and initial methods of the cascade
1. Find mysqldump.exe in the MySQL installation p...
Postfix is a free and open source MTA (Mail Tra...
1. Installation Install using yum ##Automatically...
1. Use the <a> tag to complete <a href=&...
The operating environment of this tutorial: Windo...
Table of contents 1. Introduction to Concurrency ...
To achieve the background color flashing effect, j...
Every qualified Linux operation and maintenance p...
Table of contents Concept Introduction Logical ru...
Table of contents 1. Use the a tag to preview or ...
1. Prepare in Advance For your convenience, I cre...
WEB development mainly consists of two interactio...
Table of contents 1. Application Lifecycle 2. Pag...
There are some issues that are not limited to Vue...
①. How to use the alias (CNAME) record: In the do...