1、MySQL安装目录%MYSQL_HOME%下my.ini文件
[client]
default-character-set=utf8
[mysql]
default-character-set=utf8
[mysqld]
character-set-server=utf8
default-character-set=utf8
2、重启MySQL服务
net stop mysql
net start mysql
3、查看数据库状态
mysql>status
Server characterset: utf8
Db : utf8
Client characterset : utf8
Conn characterset : utf8
...
4、mysql> show variables like "char%";查看各个字符编码集已经修改为utf8