修改mariadb的配置文件
文件所在目录:/etc/mysql/conf.d/mariadb.cnf
修改内容:
[client]
# Default is Latin1, if you need UTF-8 set this (also in server section)
default-character-set = utf8
[mysqld]
# Default is Latin1, if you need UTF-8 set all this (also in client section)
character-set-server = utf8
来源: http://www.bubuko.com/infodetail-2252446.html