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 173 times
0
Zanna
- 69,223
- 56
- 216
- 327
Hakan Demir
- 125
- 1
- 6
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,796
- 4
- 26
- 37
Inigo Marin Garcia
- 11
- 1
-
It gives `update-rc.d: error: Permission denied`. Would it pose a problem sir? – Hakan Demir Jul 11 '20 at 08:20
-
Didn't work. Mysql is still active after reboot. – Hakan Demir Jul 11 '20 at 08:23
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
- 485
- 4
- 9
-
It gives update-rc.d: error: Permission denied. Would it pose a problem sir? – Hakan Demir Jul 11 '20 at 08:23
-
-