The character set of the MySQL client will typically follow the character set set by your system. For example, if your Linux system is set to a character set of GBK, the MySQL client's character set will also be GBK to view the client's character Set statement mysql> show variables like ' character_set% '; +--------------- -----------+---------------------------------------+| variable_name | Value |+--------------------------+---------------------------------------+|character_set_client | GBK (client character set) || character_set_connection | GBK (Connection character set) | | Character_set_database | UTF8 (Database character set) | | Character_set_filesystem | Binary | | Character_set_results | GBK (return result character set) | | Character_set_server | Latin1 (MySQL server character set) | | Character_set_system | UTF8 &NBSP ;|| Character_sets_dir | D:\mysql-5.6.23-win32\share\charsets\ |+--------------------------+---------------------------------------+8 rows in Set (0.00 sec) By default character_set_client,Character_set_connection,character_set_results will be set according to the character sets of your system. This is because the MySQL client's character set and the server-side character set are different, resulting in garbled characters, the results of the above query will need to be set to the uniform character set. Generally, if you are a Linux system, you only need to set the Linux system character set to utf-8 those character sets will be unified.
Querying the MySQL client character set