Let MySQL support emoji expression solution: convert MySQL encoding from UTF8 to UTF8MB4. Requires >= MySQL 5.5.3 version, (can also be detected 5.5.29) Low version does not support this character set, copy error stop MySQL Server service
Modify MY.CNF or Mysql.ini
[Client]
Default-character-set = Utf8mb4
[MySQL]
Default-character-set = Utf8mb4
[Mysqld]
Character-set-client-handshake = FALSE
Character-set-server = Utf8mb4
Collation-server = Utf8mb4_unicode_ci
init_connect= ' SET NAMES utf8mb4 '
Restart MySQL server:service mysql restart, check the character set mysql> SHOW VARIABLES WHERE variable_name like ' character\_set\_% ' OR varia Ble_name like ' collation% '; Modify Database Character set: ALTER db database_name CHARACTER set = UTF8MB4 COLLATE = utf8mb4_unicode_ci; Modify the character set of the table: ALTER table table_name CONVERT to CHARACTER set utf8mb4 COLLATE utf8mb4_unicode_ci; Modify the character set of a field: ALTER TABLE table_name Change column_name column_name VARCHAR (191) CHARACTER set UTF8MB4 COLLATE utf8mb4_unicode _ci; If only a field needs to modify the character set of that field, you can add the connection parameters of the server connection database connector/j, not the characterencoding parameter. When this parameter is not added, the default value is AutoDetect. #jdbc_url =jdbc:mysql://localhost:3306/user?useunicode=true&characterencoding=utf-8& Zerodatetimebehavior=converttonull Remove Characterencoding=utf-8
MySQL Support emoji Emoticons