配置Linux服務下mysql數據庫服務開機自啓動

第一步:新建start文件,裏面的內容如下

#!/bin/bash

#chkconfig:  2345 80 08

#description: Start

echo "service iptables stop"

service iptables stop

echo "Starting MySQL Service ..." 

/opt/sudytech/mysql/bin/mysqld_safe &

linux服務器mysql開機自啓動 (這個是我百度微雲裏的,已分享,可以下載查看)


第二步:

1)放在/etc/rc.d/init.d/start

2)把start的屬性改成 “777”(chmod -R 777 /etc/rc.d/init.d/start)

3)查看start的屬性是否修改成功 ls -l /etc/rc.d/init.d/start

4)運行 chkconfig --add start 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章