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 booting mysql is stopped. Btw i can use only command line.
On Windows, you can set up a MySQL service that runs automatically when Windows starts. See Section 2.3. 4.8, “Starting MySQL as a Windows Service”. On Unix and Unix-like systems, you can invoke mysqld_safe, which tries to determine the proper options for mysqld and then runs it with those options.
In Ubuntu 18.04, sudo systemctl disable mysql will prevent mysql-server from autostarting on boot. For linux, there are 3 main init systems: Systemd , Upstart and SysV . Although nearly all Linux systems run on Systemd.
update-rc.d allows setting init script links on Ubuntu and Debian Linux systems to control what services are run by init when entering various runlevels. It should be able to add mysql to the list of services to run at boot:
sudo update-rc.d mysql defaults
If you later want to disable running mysql on bootup:
sudo update-rc.d mysql remove
You can do it by using sysv-rc-conf
, on debian based you can install it with sudo apt-get install sysv-rc-conf
then you can choose what start at boot with a simple X on the name of the deamon, all via command line
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With