Home  >  Article  >  Database  >  MySQL 5.5.28字符集的设置_MySQL

MySQL 5.5.28字符集的设置_MySQL

WBOY
WBOYOriginal
2016-06-01 13:38:40897browse

bitsCN.com


MySQL 5.5.28字符集的设置

 

插入数据库的中文为乱码,在mysqld下面使用default-character-set=gbk,mysql的服务都启动不了。  

 

参考官方文档相关章节

 

http://dev.mysql.com/doc/refman/5.5/en/server-system-variables.html#sysvar_character_set_client

 

得到如下结果,client的设置不变,mysqld下面的设置改为下面那样就可以了。

 

[client]

default-character-set=gbk

 

[mysqld]

character_set_server=gbk

character_set_server=gbk //影响Server characterset和Db characterset ,对应1和2

 

default-character-set=gbk  //影响Client characterset和Conn characterset 对应3和4

 

MySQL 5.5.28字符集的设置_MySQL
 

bitsCN.com
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn