首页 > 数据库> > Cause: java.sql.SQLException: Incorrect string value: ‘\xF0\x9F\x98\x80--...‘ for column ‘html_b
Cause: java.sql.SQLException: Incorrect string value: ‘\xF0\x9F\x98\x80--...‘ for column ‘html_b
作者:互联网
<property name="connectionInitSqls" value="set names utf8mb4;" />
useUnicode=true&&allowMultiQueries=true&autoReconnect=true&charset=utf8mb4
my.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'
ALTER DATABASE 数据库名 CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
alter table 表名 convert to character set utf8mb4 collate utf8mb4_bin;
标签:Incorrect,body,ci,x80,utf8mb4,character,set,SET,true 来源: https://blog.csdn.net/weixin_42470710/article/details/112546586