default-character-set = utf8失效

soul_of_moon
default-character-set = utf8失效

mysql手册上
对于mysql客户端,如果你希望使用与默认字符集不同的字符集,不需要每次启动时执行SET NAMES语句。可以在mysql语句行中或者选项文件中添加一个--default-character-set选项设置。例如,你每次运行mysql时,以下的选项文件设置把三个字符集变量修改为koi8r:

[mysql]

default-character-set=koi8r


但是我采用修改选项文件却不起作用,这是为何?
mysql  Ver 14.7 Distrib 4.1.22, for unknown-linux-gnu (mips64) using  EditLine wrapper

yueliangdao0608
Set the parameter here.
[client]

default-character-set=Your charset

[mysqld]

default-character-set=Your charset

soul_of_moon
[quote]原帖由 [i]yueliangdao0608[/i] 于 2008-6-4 13:25 发表 [url=http://bbs.chinaunix.net/redirect.php?goto=findpost&pid=8514048&ptid=1135938][img]http://bbs.chinaunix.net/images/common/back.gif[/img][/url]
Set the parameter here.
[client]

default-character-set=Your charset

[mysqld]

default-character-set=Your charset [/quote]
my.conf的各个部分,组合都试过了,都不行啊。是不是因为mysql版本的原因?

soul_of_moon
好像确实是版本限制
我在5.0上就ok,4.1不行

yueliangdao0608
[quote]原帖由 [i]soul_of_moon[/i] 于 2008-6-5 11:06 发表 [url=http://bbs.chinaunix.net/redirect.php?goto=findpost&pid=8520732&ptid=1135938][img]http://bbs.chinaunix.net/images/common/back.gif[/img][/url]
好像确实是版本限制
我在5.0上就ok,4.1不行 [/quote]

Good