mysql编码格式设置

时间:2024-08-06 19:06:44

两个地方能影响到mysql的编码格式

①、[mysql]下default-character-set=GBK//指的是客户端输入的内容的编码(GBK只是支持中英文)
②、[mysqld]下
# The default character set that will be used when a new schema or table is
# created and no character set is defined
character-set-server=utf8//mysql底层的数据编码格式(utf8支持国际化编码)
注意:
mysql版本不一样可能"character-set-server"语句就不一样,
5.0版的“default-character-set”
5.1版的“character-set-server”
但是,这个语句是一样的:
# The default character set that will be used when a new schema or table is
# created and no character set is defined
“character-set-server”就在它下面。