MySql修改字符集
修改mysql配置文件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'
备注:my.cnf一般在etc/mysql/my.cnf位置。