Small problem emojy expression

Error content: storage or update libraries emojy expression, when will report this error: java.sql.SQLException: in here Incorrect String value: '\ xf0 \ x9F \ x99 \ x8F \ ..' for column 'field name'

Error Analysis: This is emojy expression is 4 characters \ 0F9B \, not the normal storage utf8 character set field.

Solution: the windows settings under my.cnf my.ini / linux;

[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’

After setting the restart mysql service, you can set the encoding format tables and fields for a utf8mb4.

Guess you like

Origin www.cnblogs.com/xcgShare/p/11764993.html