Character_set_client, which is the character set that the user tells MySQL to query.
Character_set_connection. After MySQL receives the user query, it converts it to the character set character_set_connection according to character_set_client.
Character_set_results, MySQL converts the stored data to the character set in character_set_results and sends it to the user.
Character_set_clientThe encoding of the SQL statement is specified. If it is set to binary, MySQL will process it as binary. character_set_connection specifies the encoding used by MySQL to run the SQL statement, that is,ProgramThe SQL statement sent to MySQL is first converted from the encoding specified by character_set_client to the encoding specified by character_set_connection. If character_set_clien specifies binary, mySQL interprets the SQL statement according to the encoding specified by character_set_connection.
During SQL statement execution, for example, when a field is inserted into the database, the field also has encoding settings. If the encoding settings of the field are different from those specified by character_set_connection, mySQL converts the inserted data into the encoding set by the field. The execution process of condition judgment in SQL statements is similar to that in SQL insert statements.
After the SQL statement is executed, the data is converted from the encoding specified by the field to the encoding specified by character_set_results. If character_set_results = NULL, no conversion is performed, (Note that setting null here is not equal to not being set. MySQL inherits the global settings when no setting is set ),