Problem: MySQL insert data with Chinese characters appearing incorrect string value error
Description: A part of CMD that directly knocks the code into the data tip is truncated as: ERROR 1366 (HY000): Incorrect string value is generally a coding problem, show variables like ' character% ' view, all encodings are found Are UTF8, and there is no mistake. There is also a possible cmd black window text encoding problem, try to set the code of the client command, and then insert the correct! Then Baidu search client-side coding related problems also found that I have had the same problem. Workaround: 1. Set names GBK//sets the encoding format of the client, that is, what encoding you typed, the client will automatically turn your command into UTF8, that is, the database encoding or UTF8. 2. Locate the My.ini in the MySQL installation directory, change the Default-character-set=utf8 to DEFAULT-CHARACTER-SET=GBK, and then reopen CMD.
MySQL insert data with Chinese characters appearing incorrect string value error