Thank you everyone for your answers, the problem has been solved. After modifying the character set, I still cannot insert Chinese characters. This is because my database and tables were created before the character set was modified. After the modification, I re-created the database and table, and I can insert normally. Later, I checked the encoding of the database and table, and sure enough I found that the encoding of the attribute was latin1.
Is the encoding of your database utf8?
Change the encoding to utf8mb4 and give it a try
I guess your shell window does not support utf8.
But I set the encoding to utf8.
The client sent gbk. But the server understood it as utf8. So an error was reported.
Portal
Coding:
Mei C3B7
生C9FA
Then please see the discussion in the portal for details.
Thank you everyone for your answers, the problem has been solved. After modifying the character set, I still cannot insert Chinese characters. This is because my database and tables were created before the character set was modified. After the modification, I re-created the database and table, and I can insert normally. Later, I checked the encoding of the database and table, and sure enough I found that the encoding of the attribute was latin1.