有关Mysql的安装启动问题

我的在Redhat9下编译安装mysql

启动时出现下列错误:
/usr/local/mysql/bin/safe_mysqld
Starting mysqld daemon with databases from /var/lib/mysql
.......   mysqld ended

这是什么原因?      
我 在启动MYSQL时出现Starting mysqld daemon with databases from /var/lib/mysql
STOPPING server from pid file /var/lib/mysql/localhost.localdomain.pid
050301 19:59:44  mysqld ended

查看日志文件是
050301 19:59:41  mysqld started
050301 19:59:41 Warning: Asked for 196608 thread stack, but got 126976
050301 19:59:42  InnoDB: Started
050301 19:59:42 /usr/sbin/mysqld: Can't find file: './mysql/host.frm' (errno: 13)
050301 19:59:42 Fatal error: Can't open privilege tables: Can't find file: './mysql/host.frm' (errno: 13)
050301 19:59:42 Aborting

050301 19:59:42  InnoDB: Starting shutdown...
050301 19:59:44  InnoDB: Shutdown completed
050301 19:59:44 /usr/sbin/mysqld: Shutdown Complete

050301 19:59:44  mysqld ended
真不 知道怎么办      
我的运行环境是:
linux:rh9
要编译的mysql:mysql-max-3.23.58-pc-linux-i686.tar
编译方法:按照mysql官方文档操作
结果:没有编译成功

mymail:linhong163 at hotmail.com
QQ:354307988
---------------------------------------------------------------------------------------------------------------

官方的文档提示如下进行:
shell> groupadd mysql
shell> useradd -g mysql mysql
shell> gunzip < mysql-VERSION.tar.gz | tar -xvf -
shell> cd mysql-VERSION
shell> ./configure --prefix=/usr/local/mysql
shell> make
shell> make install
shell> cp support-files/my-medium.cnf /etc/my.cnf
shell> cd /usr/local/mysql
shell> bin/mysql_install_db --user=mysql
shell> chown -R root  .
shell> chown -R mysql var
shell> chgrp -R mysql .
shell> bin/mysqld_safe --user=mysql &

我只做到了configure --prefix=/usr/local/mysql一步,出错提示如下:

# ./configure --prefix=/usr/local/msyql
NOTE: This is a MySQL binary distribution. It's ready to run, you don't
need to configure it!

To help you a bit, I am now going to create the needed MySQL databases
and start the MySQL server for you.  If you run into any trouble, please
consult the MySQL manual, that you can find in the Docs directory.

Preparing db table
Preparing host table
Preparing user table
Preparing func table
Preparing tables_priv table
Preparing columns_priv table
Installing all prepared tables
ERROR: 1062  Duplicate entry 'localhost-root' for key 1
ERROR: 1062  Duplicate entry 'localhost-root' for key 1
050328 12:59:34  ./bin/mysqld: Shutdown Complete


To start mysqld at boot time you have to copy support-files/mysql.server
to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
This is done with:
./bin/mysqladmin -u root  password 'new-password'
./bin/mysqladmin -u root -h localhost  password 'new-password'
See the manual for more instructions.

You can start the MySQL daemon with:
cd . ; ./bin/safe_mysqld &

You can test the MySQL daemon with the benchmarks in the 'sql-bench' directory:
cd sql-bench ; run-all-tests

Please report any problems with the ./bin/mysqlbug script!

The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at https://order.mysql.com

Starting the mysqld server.  You can test that it is up and running
with the command:
./bin/mysqladmin version
[root@localhost mysql]# Starting mysqld daemon with databases from /usr/local/my
sql/data
050328 12:59:34  mysqld ended

实在不行 我把整个目录拷贝到/usr/local/mysql下
直接运行bin下的启动命令,出错如下:

# ./safe_mysqld --user=mysql &
[1] 3437
[root@localhost bin]# The file /usr/local/mysql/libexec/mysqld doesn't exist or is not executable
Please do a cd to the mysql installation directory and restart
this script from there as follows:
./bin/safe_mysqld.

[1]+  Exit 1                  ./safe_mysqld --user=mysql

-----------------------------------------------------------------------------------------------------------------
之前我安装rpm运行成功过,后来rpm -e了,现在编译一直无法成功      
./configure时报错
This is a MySQL binary distribution. It's ready to run, you don't
need to configure it!

根据这提示我直接拷贝目录下内容到/usr/local/mysql下,
直接运行#./safe_mysqld --user=mysql &

根据报错提示,我直接在mysql目录下建立]/usr/local/mysql/libexec/目录,拷贝mysqld到其中,
执行#./safe_mysqld --user=mysql &

提示报错如下:

# ./safe_mysqld --user=mysql &
[1] 3501
[root@localhost bin]# touch:正在创建目录 '/usr/local/mysql/var/localhost.err': 没有文件或那个目录
chown: 无法取得 '/usr/local/mysql/var/localhost.err' 的属性:没有文件或那个目录
Starting mysqld daemon with databases from /usr/local/mysql/var
./safe_mysqld: line 240: /usr/local/mysql/var/localhost.errer': 没有文件或那个目录
./safe_mysqld: line 246: /usr/local/mysql/var/localhost.err:  没有文件或那个目录
tee: /usr/local/mysql/var/localhost.err:  没有文件或那个目录
050328 13:13:01  mysqld ended
tee: /usr/local/mysql/var/localhost.err:  没有文件或那个目录


[1]+  Exit 1                  ./safe_mysqld --user=mysql

至此,我已经不明白该怎么做了:(      
[QUOTE=初级学徒]
我以root方式安装完mysql(3.23.43)后,使用./safe_mysqld &也不能启动,察看了日志,有如下的内容:
030529 13:46:07  mysqld started
030529 13:46:07  /usr/local/mysql/libexec/mysqld: Can't create/write to file '/u
sr/local/mysql/var/work.pid' (Errcode: 13)
030529 13:46:07  /usr/local/mysql/libexec/mysqld: Can't find file: './mysql/host
.frm' (errno: 13)
030529 13:46:07  /usr/local/mysql/libexec/mysqld: Error on delete of '/usr/local
/mysql/var/work.pid' (Errcode: 13)
030529 13:46:07  mysqld ended

看了发言之后,我明白了,是权限的问题
我应该以root身份运行mysql,于是我用如下的方式启动:
./safe_mysql -u root & 成功的运行了。
[/QUOTE]

还是不行:
# ./safe_mysqld --user=mysql &
[1] 3437
[root@localhost bin]# The file /usr/local/mysql/libexec/mysqld doesn't exist or is not executable
Please do a cd to the mysql installation directory and restart
this script from there as follows:
./bin/safe_mysqld.

[1]+ Exit 1 ./safe_mysqld --user=mysql

按照提示,建立/usr/local/mysql/libexec/目录,拷贝mysqld到其中,在运行:
# ./safe_mysqld --user=mysql &
[1] 3501
[root@localhost bin]# touch:正在创建目录 '/usr/local/mysql/var/localhost.err': 没有文件或那个目录
chown: 无法取得 '/usr/local/mysql/var/localhost.err' 的属性:没有文件或那个目录
Starting mysqld daemon with databases from /usr/local/mysql/var
./safe_mysqld: line 240: /usr/local/mysql/var/localhost.errer': 没有文件或那个目录
./safe_mysqld: line 246: /usr/local/mysql/var/localhost.err: 没有文件或那个目录
tee: /usr/local/mysql/var/localhost.err: 没有文件或那个目录
050328 13:13:01 mysqld ended
tee: /usr/local/mysql/var/localhost.err: 没有文件或那个目录


[1]+ Exit 1 ./safe_mysqld --user=mysql      
抱歉,网上的文章比米还多,可是我一步一步做,都做不来,所以发了那么多贴,sorry!      
我下载的是mysql4.1的完整包,直接执行了configuration,本来执行的很正常,但误删除了mysql下的mysql数据库所在的文件夹,无法正常启动了。后来重新执行configuration也没有用。请问该如何解决呢?      
删掉安装目录重新装吧,不好救了。