配置MySQL服务自启动
[root@hadoop05 ~]# cd /usr/local/mysql
#将服务文件拷贝到init.d下,并重命名为mysql
[root@hadoop05 mysql]# cp support-files/mysql.server /etc/rc.d/init.d/mysql
#赋予可执行权限
[root@hadoop05 mysql]# chmod +x /etc/rc.d/init.d/mysql
#删除服务
[root@hadoop05 mysql]# chkconfig --del mysql
#添加服务
[root@hadoop05 mysql]# chkconfig --add mysql
[root@hadoop05 mysql]# chkconfig --level 345 mysql on
[root@hadoop05 mysql]# vi /etc/rc.local
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.
touch /var/lock/subsys/local
su - mysqladmin -c "/etc/init.d/mysql start --federated"
"/etc/rc.local" 9L, 278C written
配