mysql中文乱码问题
在my-default.ini文件中添加如下信息:
[mysqld] port=3306 basedir = D:\Program Files\mysql-5.7.17-winx64 datadir = D:\Program Files\mysql-5.7.17-winx64\data collation-server = utf8_unicode_ci init-connect='SET NAMES utf8' character-set-server = utf8 [mysql] default-character-set=utf8 [client] default-character-set=utf8
重启mysql服务即可解决
net stop mysql
net start mysql
重新进入mysql,查询当前mysql的字符设置show variables like '%char%';