How make mysql start automatically ? (linux-cli only)

前端 未结 9 1623
没有蜡笔的小新
没有蜡笔的小新 2020-12-23 12:43

How can i make mysql start every time the system boot ? I need that in a dedicated server(ubuntu distro) in which i have my blog, but every time the server goes down, on boo

9条回答
  •  南笙
    南笙 (楼主)
    2020-12-23 13:18

    Run the following command to see your mysql current status:

    /sbin/chkconfig mysqld --list
    

    it will return a line such as below:

     mysqld             0:off   1:off   2:off   3:off   4:off   5:off   6:off
    

    to make mysql start every time the system boots, type the following:

     sudo /sbin/chkconfig mysqld on
    

    Result now from '--list' is:

    mysqld          0:off   1:off   2:on    3:on    4:on    5:on    6:off
    

提交回复
热议问题