Regardless of the version of the mysql client that the client uses to connect to the server, it is found that character_set_client, character_set_connection, character_set_results will always be consistent with the server after the character-set-serverutf8 is set on the server side, even if the option -- defa
No matter which version of mysql client the client uses to connect to the server, it is found that as long as character-set-server = utf8 is set on the server side, character_set_client, character_set_connection, and character_set_results are always consistent with those on the server side, even if the option -- defa
No matter which version of mysql client is used by the client to connect to the server, it is found that
Character-set-server = utf8,
Character_set_client, character_set_connection, character_set_results
It will always be consistent with the server, even if you add the option on the mysql client
-- Default-character-set = utf8
No, unless the connection is in, and then manually execute the command
Set names latin1 to change the character set of client, connection, and results.
After careful comparison, I finally found that another option was set on the server side:
Skip-character-set-client-handshake
The explanation for this option in this document is as follows:
-- Character-set-client-handshake
Don't ignore character set information sent by the client. to ignore client information and use the default server character set, use -- skip-character-set-client-handshake; this makes MySQL behave like MySQL 4.0
In this case, it is also beneficial. For example, If you enable the skip-character-set-client-handshake option, you can avoid client program misoperations by using other character sets to connect and write data, leading to Garbled text.