java.sql.SQLException: Incorrect string value:‘\xF0\x9F\x92\xA9\x0D\x0A...’的解决方法

ALTER DATABASE `wechat` CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;

# 修改表字符集编码
ALTER TABLE `daily_content` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

ALTER TABLE `daily_content` CHANGE description description VARCHAR(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;


# 修改表字符集编码
ALTER TABLE `daily_detail` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

ALTER TABLE `daily_detail` CHANGE description description VARCHAR(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;


 

你可能感兴趣的:(数据库,sql)