标题: 关于RedHat4企业版AS下安装MySQL后,服务启动失败的解决方案! [打印本页] 作者: gongxing 时间: 2009-4-19 22:18 标题: 关于RedHat4企业版AS下安装MySQL后,服务启动失败的解决方案! 今天在RedHat4下安装成功MySQL后,但MySQL启动一直有问题,经过4个小时的持续作战,终于找到原因解决了!
下面是安装信息:
[root@localhost ~]# rpm -ivh MySQL-server-5.0.16-0.i386.rpm
warning: MySQL-server-5.0.16-0.i386.rpm: V3 DSA signature: NOKEY, key ID 5072e1f5
Preparing... ########################################### [100%]
1:MySQL-server ########################################### [100%]
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h localhost.localdomain password 'new-password'
See the manual for more instructions.
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
Starting MySQL...................................[FAILED]
查看安装日志,重复显示下面信息:
090419 21:05:00 mysqld started
090419 21:05:00 mysqld ended
发现服务一启动,马上停止,在网上查找资料,找到安装时要先禁用SELinux,再安装MySQL,步骤是:
1. 关闭SELinux,重启系统;
2. 安装MySQL(MySQL server应该可以启动了);
3. 启用SELinux,重启系统,之后MySQL server就可以正常启动了。
启用禁用SELinux的方法是:
vi /etc/selinux/config(也有人说是/etc/sysconfig/selinux文件,其实两个之间是链接关系,随便改其中一个,另一个也改了)
SELINUX=disable 禁用SeLinux