MYSQL无法启动?

MYSQL无法启动?

下载 mysql-5.0.45-linux-i686-glibc23.tar.gz
解压后 目录如下:

[root@localhost mysql]# ls -l
total 96
drwxr-xr-x 2 8972 8972  4096 2007-07-05 00:23 bin
-rwxr-xr-x 1 8972 8972   801 2007-07-05 00:22 configure
-rw-r--r-- 1 8972 8972 19071 2007-07-04 21:06 COPYING
drwxr-x--- 4 8972 8972  4096 2008-11-24 18:20 data
drwxr-xr-x 2 8972 8972  4096 2007-07-05 00:23 docs
-rw-r--r-- 1 8972 8972  5139 2007-07-04 21:06 EXCEPTIONS-CLIENT
drwxr-xr-x 3 8972 8972  4096 2007-07-05 00:23 include
-rw-r--r-- 1 8972 8972  8528 2007-07-05 00:01 INSTALL-BINARY
drwxr-xr-x 2 8972 8972  4096 2007-07-05 00:23 lib
drwxr-xr-x 4 8972 8972  4096 2007-07-05 00:23 man
drwxr-xr-x 9 8972 8972  4096 2007-07-05 00:23 mysql-test
-rw-r--r-- 1 8972 8972  1410 2007-07-04 21:05 README
drwxr-xr-x 2 8972 8972  4096 2007-07-05 00:23 scripts
drwxr-xr-x 3 8972 8972  4096 2007-07-05 00:23 share
drwxr-xr-x 5 8972 8972  4096 2007-07-05 00:23 sql-bench
drwxr-xr-x 2 8972 8972  4096 2007-07-05 00:23 support-files
drwxr-xr-x 2 8972 8972  4096 2007-07-05 00:23 tests

./configure 后 结果如下 :
[root@localhost mysql]# ./configure
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.

Installing MySQL system tables...
OK
Filling help tables...
OK

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 !
To do so, start the server, then issue the following commands:
./bin/mysqladmin -u root password 'new-password'
./bin/mysqladmin -u root -h localhost.localdomain password 'new-password'
See the manual for more instructions.
You can start the MySQL daemon with:
cd . ; ./bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl
cd mysql-test ; perl mysql-test-run.pl

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 http://shop.mysql.com
Starting the mysqld server.  You can test that it is up and running
with the command:
./bin/mysqladmin version
[root@localhost mysql]# nohup: redirecting stderr to stdout
Starting mysqld daemon with databases from /home/web/mysql/data
STOPPING server from pid file /home/web/mysql/data/localhost.localdomain.pid
081125 16:08:11  mysqld ended

按照上面的提示,这个套件是不需要安装的?
但是 按照提示 始终无法启动mysql服务?

[root@localhost mysql]# ./bin/mysqld_safe &
[1] 3478
[root@localhost mysql]# nohup: ignoring input and redirecting stderr to stdout
Starting mysqld daemon with databases from /home/web/mysql/data
STOPPING server from pid file /home/web/mysql/data/localhost.localdomain.pid
081125 16:09:53  mysqld ended

切换到mysql用户 进入bin目录

[mysql@localhost bin]$ ./mysqld
081125 16:21:03 [Warning] Can't create test file /usr/local/mysql/data/localhost.lower-test
081125 16:21:03 [Warning] Can't create test file /usr/local/mysql/data/localhost.lower-test
./mysqld: Can't change dir to '/usr/local/mysql/data/' (Errcode: 13)
081125 16:21:03 [ERROR] Aborting

081125 16:21:03 [Note] ./mysqld: Shutdown complete

回到root用户
[mysql@localhost bin]$ su
Password:
[root@localhost bin]# ./mysqld
081125 16:21:52 [ERROR] Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!

081125 16:21:52 [ERROR] Aborting

081125 16:21:52 [Note] ./mysqld: Shutdown complete

谁帮我解释一下。。。。。。
乱七八遭的 额

没人帮忙。。。
你的MYSQL都没有权限,怎样运行啊。。

drwxr-x--- 4 8972 8972  4096 2008-11-24 18:20 data

一看就知了。。 8972这个一定是你mysql的UID。。
你新加一个mysql用户
useradd mysql
passwd mysql -->自己定

chown -R mysql.mysql mysql/

service mysqld start