You can add the following points if you have any better solutions.
Modify the my. ini configuration file under the MySQL installation directory
One location is under the [client] label. Change this location to default-character-set = gutf8 to change the user's default encoding. The second part is located under the [mysqld] label and changed to default-character-set = utf8
Enter the following command in the MySQL command line:
Set characterSetClient = utf8;
Set characterSetConnection = utf8;
Set characterSetDatabase = utf8;
Set characterSetResults = utf8 ;/It is useful here./
Set characterSetServer = utf8;
However, after the restart, the encoding settings are restored.
Creating a database or table
Add the encoding ID, for example, create databaseTest2
Default Character Set utf8 collate utf8GeneralThe specified library is UTF-8 encoded.
In phpMyAdmin, directly select utf8GeneralCi
You can also encode the strap when creating a table, for example, create table abc (...;) charset = utf8;
During development in other languages, note that the database connection must be consistent with the database encoding.
For example, in Java, JDBC: mysql: // 192.168.0.5: 3306/test? Characterencoding = utf8
Set the encoding to utf8.
Currently, I can only write so much data.