linux开启启动的程序一般放在/etc/rc.d/init.d/里面,/etc/init.d/是其软连接
mysql设为linux服务
cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysqld
chkconfig --add mysqld
chkconfig --level 2345 mysqld on
chown mysql:mysql -R /usr/local/mysql/
service mysqld start