修改 /etc/mysql/my.cnf 文件
mysql
[client]
default-character-set=utf8
[mysql]
default-character-set=utf8
[mysqld]
collation-server = utf8_unicode_ci
init-connect=’SET NAMES utf8′
character-set-server = utf8sql
修改後 /etc/init.d/mysql stopcode
/etc/init.d/mysql statrserver
重啓mysql
ci