java操作mysql异常
Incorrect string value: '\xF0\x9F\x90\x98\xF0\x9F...' for column 'NICKNAME' at row 1
解决方法:
1.设置mysql配置:
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci
2.同时jdbc连接中jdbc:mysql://10.201.11.102:3306/ufs_dev1?autoReconnect=true&useUnicode=true&characterEncoding=utf-8
去掉characterEncoding
Incorrect string value: '\xF0\x9F\x90\x98\xF0\x9F...' for column 'NICKNAME' at row 1
解决方法:
1.设置mysql配置:
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci
2.同时jdbc连接中jdbc:mysql://10.201.11.102:3306/ufs_dev1?autoReconnect=true&useUnicode=true&characterEncoding=utf-8
去掉characterEncoding