1.
Character set (character set) is the ing from binary encoding to the specified symbol set;
Collation is a set of Character Set sorting principles;
2.
If you run show variables like "% character %" on the mysql client, the character set setting in "7" will appear:
Character_set_client
Character_set_connection
Character_set_database
Character_set_filesystem
Character_set_results
Character_set_server
Character_set_system
3.
MySQL has default character sets and sorting rules for each database and table on the server.
When creating a database, it inherits character_set_server settings from the server;
When creating a table, the character set is inherited from the database; when creating a column, the character set is inherited from the table;
The server assumes that the client is sending data according to the character_set_client character set;
Then, the data is translated according to the character set in character_set_connection;
When data is returned, the server translates the data according to the character set defined by character_set_result;
High-performance MySQL