mysql存储特殊字符问题,设置编码utf8mb4

错误:

mysql存储特殊字符问题,设置编码utf8mb4_第1张图片
参考链接:
本地数据库: https://www.cnblogs.com/shihaiming/p/5855616.html
rds: https://help.aliyun.com/knowledge_detail/41706.html?spm=5176.7841698.2.9.F5YjI5



本地数据库:修改my.cnf (windows为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'


rds:主要修改控制台上的参数参照charater-set-server

你可能感兴趣的:(java)