mysql中文乱码解决办法

Windows

在C:\Program Files\MySQL\MySQL Server 5.5\bin目录下

 

MySQLInstanceConfig.exe执行 重新配置character_set_server=utf8

 

show variables like "%char%";

 

 

 

 

SET character_set_connection=utf8, character_set_results=utf8, character_set_client=binary

 

---------------------------------------------------------------------------------------------------------------Linux安装mysql 解决中文乱码 ----------------------------------------------------

#vim /etc/mysql/my.cnf 。如下修改:

[client]
default-character-set=utf8

[mysqld]
default-storage-engine=INNODB
character-set-server=utf8
collation-server=utf8_general_ci

 

 

-----------------------------------------------------------------------------------------------------

 

posted @ 2017-04-16 00:01  洞玄巅峰  阅读(141)  评论(0编辑  收藏  举报