1.执行whereis mysql会有如下打印:
mysql: /usr/bin/mysql /usr/lib64/mysql /usr/include/mysql /usr/share/mysql /usr/share/man/man1/mysql.1.gz
2.cd /usr/share/mysql目录下查看存在mysql.server文件
3.复制mysql.server文件 到 /etc/init.d/下,命名为mysqld
cp /usr/share/mysql/mysql.server /etc/init.d/mysqld
4.chkconfig --add mysqld
5.chkconfig --level 12345 mysqld on