ubuntu关闭mysql开机自启动
To disable MySQL from starting automatically at boot time on Ubuntu, follow these steps:
- Open a terminal window.
- Use the following command to stop the MySQL server:
sudo service mysql stop
- Use the following command to disable the MySQL service:
sudo update-rc.d mysql disable
This will disable the MySQL service from starting automatically at boot time. You can use the same command with "enable" instead of "disable" to re-enable the service.
Alternatively, you can use the following command to disable the MySQL service:
sudo systemctl disable mysql.service
This will also prevent MySQL from starting automatically at boot time. You can use the same command with "enable" instead of "disable" to re-enable the service.
Note: These instructions are for Ubuntu systems using the init.d scripts to manage service startup. If you are using a system that uses systemd to manage service startup, you may need to use different commands to control the startup of the MySQL service.