mysql-standard-4.1.13编译安装的问题

mysql-standard-4.1.13编译安装的问题

我按照mysql-standard-4.1.13l的INSTALL-BINARY 一步步来的,其步骤如下:
shell> groupadd mysql
shell> useradd -g mysql mysql
shell> cd /usr/local
shell> gunzip < /PATH/TO/MYSQL-VERSION-OS.tar.gz | tar xvf -
shell> ln -s FULL-PATH-TO-MYSQL-VERSION-OS mysql
shell> cd mysql
shell> scripts/mysql_install_db --user=mysql
shell> chown -R root .
shell> chown -R mysql data
shell> chgrp -R mysql .
shell> bin/mysqld_safe --user=mysql &

但是我在 scripts/mysql_install_db --user=mysql这一步始终有问题,bin/mysqld_safe --user=mysql &也有问题,其错误信息如下:

[root@test2 mysql]# scripts/mysql_install_db --user=mysql
Installing all prepared tables
Fill help tables
050812 18:21:43 [ERROR] ./bin/mysqld: Can't find file: './mysql/help_topic.frm' (errno: 13)
050812 18:21:43 [ERROR] ./bin/mysqld: Can't find file: './mysql/help_topic.frm' (errno: 13)
ERROR: 1017 Can't find file: './mysql/help_topic.frm' (errno: 13)
050812 18:21:43 [ERROR] ./bin/mysqld: Can't find file: './mysql/help_category.frm' (errno: 13)
050812 18:21:43 [ERROR] ./bin/mysqld: Can't find file: './mysql/help_category.frm' (errno: 13)
ERROR: 1017 Can't find file: './mysql/help_category.frm' (errno: 13)
050812 18:21:43 [ERROR] ./bin/mysqld: Can't find file: './mysql/help_keyword.frm' (errno: 13)
050812 18:21:43 [ERROR] ./bin/mysqld: Can't find file: './mysql/help_keyword.frm' (errno: 13)
ERROR: 1017 Can't find file: './mysql/help_keyword.frm' (errno: 13)
050812 18:21:43 [ERROR] ./bin/mysqld: Can't find file: './mysql/help_relation.frm' (errno: 13)
050812 18:21:43 [ERROR] ./bin/mysqld: Can't find file: './mysql/help_relation.frm' (errno: 13)
ERROR: 1017 Can't find file: './mysql/help_relation.frm' (errno: 13)
050812 18:21:43 [ERROR] ./bin/mysqld: Can't find file: './mysql/help_category.frm' (errno: 13)
050812 18:21:43 [ERROR] ./bin/mysqld: Can't find file: './mysql/help_category.frm' (errno: 13)
ERROR: 1017 Can't find file: './mysql/help_category.frm' (errno: 13)
050812 18:21:43 [ERROR] ./bin/mysqld: Can't find file: './mysql/help_category.frm' (errno: 13)
050812 18:21:43 [ERROR] ./bin/mysqld: Can't find file: './mysql/help_category.frm' (errno: 13)
ERROR: 1017 Can't find file: './mysql/help_category.frm' (errno: 13)
050812 18:21:43 [ERROR] ./bin/mysqld: Can't find file: './mysql/help_topic.frm' (errno: 13)
050812 18:21:43 [ERROR] ./bin/mysqld: Can't find file: './mysql/help_topic.frm' (errno: 13)
ERROR: 1017 Can't find file: './mysql/help_topic.frm' (errno: 13)
050812 18:21:43 [ERROR] ./bin/mysqld: Can't find file: './mysql/help_topic.frm' (errno: 13)
050812 18:21:43 [ERROR] ./bin/mysqld: Can't find file: './mysql/help_topic.frm' (errno: 13)
ERROR: 1017 Can't find file: './mysql/help_topic.frm' (errno: 13)
050812 18:21:43 [ERROR] ./bin/mysqld: Can't find file: './mysql/help_topic.frm' (errno: 13)
050812 18:21:43 [ERROR] ./bin/mysqld: Can't find file: './mysql/help_topic.frm' (errno: 13)
ERROR: 1017 Can't find file: './mysql/help_topic.frm' (errno: 13)
050812 18:21:43 [ERROR] ./bin/mysqld: Can't find file: './mysql/help_topic.frm' (errno: 13)
050812 18:21:43 [ERROR] ./bin/mysqld: Can't find file: './mysql/help_topic.frm' (errno: 13)
ERROR: 1017 Can't find file: './mysql/help_topic.frm' (errno: 13)
050812 18:21:43 [ERROR] ./bin/mysqld: Can't find file: './mysql/help_topic.frm' (errno: 13)
050812 18:21:43 [ERROR] ./bin/mysqld: Can't find file: './mysql/help_topic.frm' (errno: 13)

[root@test2 mysql]# bin/mysqld_safe --user=mysql &
[1] 12908
[root@test2 mysql]# Starting mysqld daemon with databases from /var/lib/mysql
STOPPING server from pid file /var/run/mysqld/mysqld.pid
050812 18:28:02 mysqld ended      
> >  [root@test2 mysql]# Starting mysqld daemon with databases from /var/lib/mysql
STOPPING server from pid file /var/run/mysqld/mysqld.pid
050812 18:28:02 mysqld ended

检查一下 hostname 命令的输出,不要使用 localhost 这样的名字      
为什么没有写出 ./configure  这段的配置??
我怀疑你的 ./configure  这段配置有不适当的地方.造成你的MySQL用户没有对系统目录的读写权限

这个也是我在编译MYSQL的时候,经常忘记的错误.
可否给出完整的 ./configure 配置

我的常用配置如下
./configure --prefix=/usr/local/mysql --with-charser=gb2312 --localstatedir=/var/db/mysql      
:cool: 试试这两条命令:
chown -R mysql:mysql /var/db/mysql            '数据库目录
chmod -R 755 /var/db/mysql