Let MySQL support emoji expression access solution
The app mobile does not need to make any changes, the service side modification can.
First step: Modify Jdbcurl:
Conn.url=jdbc:mysql://127.0.0.1:3306/eyes?zerodatetimebehavior=converttonull&autoreconnect=true
Step two: MySQL driver package:
Mysql-connector-java-5.1.24.jar
Step Three: Database version check:
Select version () #查看mysql版本5.6.23-log supports UTF8MB4 character set
Fourth Step: Modify the MySQL configuration file My.ini, correctly configured as:
[MYSQL]DEFAULT-CHARACTER-SET=UTF8MB4[MYSQLD]CHARACTER-SET-SERVER=UTF8MB4
Restart the MySQL service when you are finished modifying it.
Fifth step: Check if the correct MySQL character set is successful:
****************************************
Character_set_database= ' UTF8MB4 ';
Character_set_server= ' UTF8MB4 ';
Collation_database= ' Utf8mb4_unicode_ci ';
Collation_server= ' utf8mb4_unicode_ci';
****************************************
Sixth step: App-side test access emoji emoticons:
App input emoticons and Chinese and submit to background Save:
Log in the background MySQL database table:
App request to get just submitted emoji emoji results: ok!
MySQL support emoji expression access solution