一、windows修改mysql字符集
1、前提:要停止mysql服务
2、修改如下文件:
C:ProgramDataMySQLMySQL Server 5.7
3、在该文件下进行配置修改
[client]
default-character-set = utf8
[mysql]
default-character-set = utf8
[mysqld]
character-set-client-handshake = FALSE
character-set-server = utf8
collation-server = utf8_unicode_ci
init_connect=’SET NAMES utf8’
图示:
4、启动mysql服务
net start mysql57
6、查看字符集:
show variables like 'character%';