编译/etc/mysql/my.cnf,在[client]中添加:
default-character-set=utf8
在[mysqld]中添加:
character-set-server=utf8
collation-server=utf8_general_ci
重启后登录,通过以下命令查看:
show variables like 'char%';
编译/etc/mysql/my.cnf,在[client]中添加:
default-character-set=utf8
character-set-server=utf8
collation-server=utf8_general_ci
show variables like 'char%';