Whenever I boot, when I type systemctl status mysql.service, I see MySQL is running. I want to manually activate MySQL whenever I need it. I forget to turn off every single time I don't need the service. How can I get the setup I want?
Asked
Active
Viewed 240 times
0
Zanna
- 72,312
Hakan Demir
- 144
2 Answers
1
systemctl disable mysql.service to disable service on boot.
Type systemctl start mysql.service when you need and systemctl stop mysql.service to stop.
Jeremy
- 2,926
0
To stop MySQL from starting when the computer starts you disable it in two steps:
First stop MySQL from running:
sudo systemctl stop mysql.serviceThen see to it that it won't start when restarting the computer:
sudo systemctl disable mysql.service
Serafim
- 515