Linux下Mysql自啟動

來源:互聯網
上載者:User

標籤:

如果你都是按照預設配置安裝的那麼只要按照如下步驟就可以了

 

1、cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysql   將服務檔案拷貝到init.d下,並重新命名為mysql

2、chmod +x /etc/init.d/mysql    賦予可執行許可權

3、chkconfig --add mysql        添加服務

4、chkconfig --list             顯示服務列表

如果看到mysql的服務,並且3,4,5都是on的話則成功,如果是off,則鍵入

 

chkconfig --level 345 mysql on
5、reboot重啟電腦
6、netstat -na | grep 3306,如果看到有監聽說明服務啟動了

轉載聲明:http://www.cnblogs.com/fnlingnzb-learner/p/5832917.html

Linux下Mysql自啟動

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.