The solution that mysql cannot store Chinese character strings: first change the character set of the database and tables to utf8; then delete the relevant fields and recreate them; finally use SQL statements to modify the character set to utf8.
Of course, we can also use SQL statements to modify the character set:
alter database test default character set = utf8; // test is the database name alter table test.bd_user default character set = utf8; // bd_user is the table name alter table test.bd_user modify column user_name varchar(20) character set utf8 collate utf8_general_ci; // The field type will also be changed here
The above are the details of how mysql cannot store Chinese character strings, more please Follow other related articles on 1024programmer.com!