Error when inserting data into database or out of the normal display when garbled. The first thing you should think about is the database coding problem. View the default character set for database processing by the current database server
Show variables like ' character_set% ';
character_set_client; The data format for the default client
character_set_connection; connection layer Character Set
character_set_database; current database Character Set
character_set_results; the server gives the external character set
If the client character set differs from the database server character set, it can be resolved by modifying the character format of the database server, such as Set_character_client = GBK.
The modification is at the session level when the restart is modified to expire (shortcut set server character set names GBK); Permanent modifications are required to be modified in the configuration file.
garbled problems when inserting data into a database when the character set or query is data is not displayed correctly