1.找到my.ini文件,修改一下配置:
[client] default-character-set=utf8mb4 [mysqld] character-set-client-handshake = FALSE character-set-server = utf8mb4 collation-server = utf8mb4_unicode_ci init_connect='SET NAMES utf8mb4' [mysql] default-character-set=utf8mb4
注意已有的项要先注释掉,如果有重复的项,mysql服务会无法启动
2.修改需要保存emoji表情的字段collation为 utf8mb4_unicode_ci