IT貓撲網(wǎng):您身邊最放心的安全下載站! 最新更新|軟件分類|軟件專題|手機(jī)版|論壇轉(zhuǎn)貼|軟件發(fā)布

您當(dāng)前所在位置:首頁(yè)數(shù)據(jù)庫(kù)MYSQL → Ubuntu下禁止和啟用MySQL的自啟動(dòng)

Ubuntu下禁止和啟用MySQL的自啟動(dòng)

時(shí)間:2015/6/28來(lái)源:IT貓撲網(wǎng)作者:網(wǎng)管聯(lián)盟我要評(píng)論(0)

  取消自動(dòng)啟動(dòng)

  linux:/etc/init.d">root@sean-linux:/etc/init.d# service mysql stop

  * Stopping MySQL database server mysqld   [ OK ]

  root@sean-linux:/etc/init.d# update-rc.d -f mysql remove

  Removing any system startup links for /etc/init.d/mysql ...

  /etc/rc0.d/K21mysql

  /etc/rc1.d/K21mysql

  /etc/rc2.d/S19mysql

  /etc/rc3.d/S19mysql

  /etc/rc4.d/S19mysql

  /etc/rc5.d/S19mysql

  /etc/rc6.d/K21mysql

  手動(dòng)啟動(dòng)

  root@sean-linux:/etc/init.d# service mysql start

  * Starting MySQL database server mysqld   [ OK ]

  * Checking for corrupt, not cleanly closed and upgrade needing tables.

  手動(dòng)停止

  root@sean-linux:/etc/init.d# service mysql stop

  * Stopping MySQL database server mysqld   [ OK ]

  添加自動(dòng)啟動(dòng)

  root@sean-linux:/etc/init.d# update-rc.d -f mysql defaults

  Adding system startup for /etc/init.d/mysql ...

  /etc/rc0.d/K20mysql -> ../init.d/mysql

  /etc/rc1.d/K20mysql -> ../init.d/mysql

  /etc/rc6.d/K20mysql -> ../init.d/mysql

  /etc/rc2.d/S20mysql -> ../init.d/mysql

  /etc/rc3.d/S20mysql -> ../init.d/mysql

  /etc/rc4.d/S20mysql -> ../init.d/mysql

  /etc/rc5.d/S20mysql -> ../init.d/mysql

  root@sean-linux:/etc/init.d#

  ----------------------------------------------------------------------------

  補(bǔ)充

  Ubuntu 取消 Apache及MySQL等自啟動(dòng)

  1. 裝個(gè) sysv-conf-rc

  2. sudo update-rc.d -f mysql remove 刪除mysql隨機(jī)器啟動(dòng)的服務(wù)

  sudo update-rc.d -f apache2 remove 刪除apache2隨機(jī)器啟動(dòng)的服務(wù)

  3. 查看/etc/rc2.d/里面的apache和mysql啟動(dòng)腳本,通常都是兩個(gè)阿拉伯?dāng)?shù)字后再接一個(gè)英文字母,再加腳本名稱。英文字母是S的都是會(huì)自動(dòng)啟動(dòng)的,K則相反。所以只要找到apache和mysql的啟動(dòng)腳本,把S改成K就可以了。

關(guān)鍵詞標(biāo)簽:Ubuntu,MySQL

相關(guān)閱讀

文章評(píng)論
發(fā)表評(píng)論

熱門文章 10款MySQL數(shù)據(jù)庫(kù)客戶端圖形界面管理工具推薦10款MySQL數(shù)據(jù)庫(kù)客戶端圖形界面管理工具推薦MySQL常用維護(hù)管理工具MySQL常用維護(hù)管理工具Linux VPS/服務(wù)器上輕松導(dǎo)入、導(dǎo)出MySQL數(shù)據(jù)Linux VPS/服務(wù)器上輕松導(dǎo)入、導(dǎo)出MySQL數(shù)據(jù)MySQL復(fù)制的概述、安裝、故障、技巧、工具MySQL復(fù)制的概述、安裝、故障、技巧、工具

相關(guān)下載

人氣排行 MySQL數(shù)據(jù)庫(kù)啟動(dòng)失敗1067進(jìn)程意外終止的解決辦法總結(jié)Mysql 1045錯(cuò)誤解決辦法10款MySQL數(shù)據(jù)庫(kù)客戶端圖形界面管理工具推薦MySQL服務(wù)器進(jìn)程CPU占用100%解決辦法MySQL導(dǎo)出導(dǎo)入命令的用例MySQL無(wú)法啟動(dòng)、無(wú)法停止各種解決方法總結(jié)三種常用的MySQL建表語(yǔ)句Mysql清空表的實(shí)現(xiàn)方法