LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1726|回复: 2

mysql支持utf8的问题

[复制链接]
发表于 2006-7-22 08:44:15 | 显示全部楼层 |阅读模式
我的平台是ubuntu5.10 server版本,mysql为4.0.24,我在my.cnf的[mysqld]中增加以下内容:
default-character-set=utf8

sudo /usr/sbin/mysqld时报,Character set 'utf8' is not a compiled character set and is not specified in the '/usr/share/mysql/charsets/Index' file

还有如果用sudo /etc/init.d/mysql restart启动时报:
/usr/bin/mysqladmin:connect to server at 'localhost' failed
error:'Can't connect to local Mysql server through socket 'var/run/mysql/mysqld.sock' (2)'
Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!
发表于 2006-9-20 13:39:31 | 显示全部楼层
说明不支持i用utf8的编码,没有编译支持utf8。改成gb2312就好了,是默认支持的,如果你不该的话也可以用,只不过再每次登录后都要手工运行mysqld &,这样也可以运行使数据库运行。不过还是改一下gb2312吧,这样不会抱错了,也不用每次手工执行
回复 支持 反对

使用道具 举报

发表于 2006-9-20 15:57:39 | 显示全部楼层
mysql 4.1.x以前不支持指定字符集,lz可以换成4.1.x或者更新的版本。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表