

MySQL设置字符集全部为utf8的方法:
(推荐学习:mysql教程)
1、打开MySQL安装目录下的my.ini文件,编辑如下内容:
[client]节点 default-character-set=utf8 (增加) [mysql]节点 default-character-set=utf8 (修改) [mysqld]节点 default-character-set=utf8 (修改) character_set_server=utf8 (增加)
2、重新启动mysql服务
net stop mysql net start mysql
3、重新登录mysql,执行如下命令查看当前数据库字符集配置
show variables like '%character%';
