[root@iZ112fail84Z ~]# vim /etc/my.cnf
max_allowed_packet = 10M
lower_case_table_names=1
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci
init_connect=’SET NAMES utf8mb4’
character-set-client-handshake = FALSE
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
[mysql]
default-character-set = utf8mb4
[root@iZ112fail84Z ~]# service mysql restart
Shutting down MySQL…. [ OK ]
Starting MySQL. [ OK ]