高手请帮忙!!!(急急急)

高手请帮忙!!!(急急急)

我安装完redhat7.3后,mysql服务无法启动,请问有什么办法解决。
出错信息如下:

[root@ALEX download]# mysql -uroot -p
Enter password:
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

另外一种报错信息:
[root@ALEX download]# mysql -h192.168.0.1 -uroot -p
Enter password:
ERROR 2003: Can't connect to MySQL server on '192.168.0.1' (111)

请问这是怎么回事啊,请大家帮忙(急急急)      
先看日志!!!/var/log/mysqld
然后对症下药:


不过可能需要以下步骤:
初始化mysql
然后把/var/lib/mysql/下面的东西改成mysql用户所有。试试吧!      
/var/log/mysqld里面是空的,应该怎么办???
请问怎么样初始化mysql ???
我是第一次装mysql,请高手多多指教!!!      
是/var/log/mysqld.log


初始化mysql是用mysql_install_db命令,用root运行

然后先chown mysql:mysql /var/lib/mysql -R

然后service mysqld start。      
help
[root@ALEX /]# mysql_install_db
Sorry, the host 'ALEX' could not be looked up.
Please configure the 'hostname' command to return a correct hostname.
If you want to solve this at a later stage, restart this script with
the --force option
[root@ALEX /]#

初始化都不行,请问该怎么办啊???      
怎么机器名也有问题啊,奇怪。

照他说的做
hostname ALEX
或在/etc/hosts文件里修改。      
hostname ALEX以后还是一样,没用      
但是我用hostname localhost后,初始化可以进行,出现如下信息:
[root@ALEX alex]# mysql_install_db
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
020729 17:39:23  /usr/libexec/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:
/usr/bin/mysqladmin -u root -p password 'new-password'
/usr/bin/mysqladmin -u root -h localhost -p password 'new-password'
See the manual for more instructions.

You can start the MySQL daemon with:
cd /usr ; /usr/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 /usr/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      
再不行的话,你就把mysql删了,再装
用 rpm      
mysql是我装redhat7.3是选上的,请问现在要删掉它,怎么删啊???