#Mysql start command
restart_mysql="service mysql start"
pgrep="/usr/bin/pgrep"# mysql daemon name,
mysql_service="mysqld"# find mysql pid$pgrep ${mysql_service}#if mysql is not runnintif[ $? -ne 0 ];then
# restart apache$restart_mysqlelseecho'Mysql Run-Ning'
fi
写好之后放到你想放得位置里如图(/applicontion)
查看rc.local 文件权限大小 [root@localhost etc]# ls -l /etc/rc.d/rc.local (目前权限太小)