MySQL support emoji expression access solution

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.