ubuntu关闭mysql开机自启动

To disable MySQL from starting automatically at boot time on Ubuntu, follow these steps:

  1. Open a terminal window.
  2. Use the following command to stop the MySQL server:
sudo service mysql stop
  1. 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.

posted @ 2023-01-05 17:50  NwN  阅读(281)  评论(0编辑  收藏  举报