Chinaunix首页 | 论坛 | 博客
  • 博客访问: 92255200
  • 博文数量: 19283
  • 博客积分: 9968
  • 博客等级: 上将
  • 技术积分: 196062
  • 用 户 组: 普通用户
  • 注册时间: 2007-02-07 14:28
文章分类

全部博文(19283)

文章存档

2011年(1)

2009年(125)

2008年(19094)

2007年(63)

分类: Mysql/postgreSQL

2008-04-25 21:39:48

作者: btchnia  出自:
在安装的过程中,我们可以选择gb2312或者utf8作为字符编码,比较国际化的就是uft8,这样你的数据库可以“游历四方”了,但是却不能插入汉字的字段,可以修改一下配置文件

在安装目录下找到my.ini文件

[client]

port=3306

[mysql]

default-character-set=gbk

大概是57行的位置,这里改为gbk

#Path to installation directory. All paths are usually resolved relative to this.
basedir="D:/MySQL/MySQL Server 5.0/"

#Path to the database root
datadir="D:/MySQL/MySQL Server 5.0/Data/"

# The default character set that will be used when a new schema or table is
# created and no character set is defined
default-character-set=utf8
大概是81行的位置,这里写UTF8

这样,我们的MySQL就是一个具有utf8内部核心但是却能理解gbk编码的了。
阅读(416) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~