Mysql5.7修改字符集

Posted 御姐玫瑰

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Mysql5.7修改字符集相关的知识,希望对你有一定的参考价值。

 一、windows修改mysql字符集

 

1、前提:要停止mysql服务

 

 2、修改如下文件:

C:\\ProgramData\\MySQL\\MySQL 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%\';

 

以上是关于Mysql5.7修改字符集的主要内容,如果未能解决你的问题,请参考以下文章