Today, I encountered an Incorrect string value ERROR when inserting a Chinese character in Mysql. Background: part of the code insertion prompt in CMD is: ERROR 1366 (HY000 ): incorrect string value Baidu once, said it is a encoding problem, show variables like 'character % 'After viewing, found that all encoding is UTF8, there is no error to continue to check the cause, someone on the Internet said that the problem of mysql's replica set is the original article: "the original problem lies in mysql, mysql if you set the encoding set to utf8, then it can only support up to three bytes of UTF-8 encoding, the 4-byte UTF-8 character still exists, so if you create a table with utf8 Character Set exception is taken for granted. The solution is simple. Modify the character set of a field or table to utf8mb4. However, utf8mb4 is supported only after mysql 5.5.3... "The results he said must be upgraded before they can be modified. He gave up and thought it was not my problem. Later, I thought about whether to input the text encoding in CMD. I tried to set the encoding of the Client Command first and then insert it correctly! Then Baidu searched for client Encoding Problems and found the same problems with me. Solution: set names gbk // set the encoding format of the client, that is, the encoding you typed in. The client automatically converts your command to UTF8, that is, the database encoding is also UTF8 or find my In the installation directory. ini changes default-character-set = utf8 to default-character-set = gbk;