I. Selecting the appropriate character set
Two. mysql-supported character sets
MySQL server can support a variety of character sets, the same server, the same database, or even a different field of the same table can be specified using a different character set.
View all available character Set commands are show character set;
Or view Information_schema.character_set, you can display all character sets and the default proofing rules for that character set. desc information_schema.character_sets;
The MySQL character set includes two concepts: the Character set (CHARACTER) and the proofing rules (COLLATION). where the character set is used to define how MySQL stores strings, proofing rules are used to define how strings are compared . A character set can have multiple proofing rules.
Three. Settings for MySQL character set
The MySQL character set and proofing rules have 4 levels of default settings: Server-level, database-level, table-level, and field-level.
If you do not specify a specific server character set, the default is to use Latin1 as the server character set. If you do not specify a proofing rule as above, the default proofing rules are used. You can specify the proofing rules at the same time as you want in the specified character set.
MySQL Character set