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 193 times
0

Zanna
- 70,465

Hakan Demir
- 145
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,846
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.service
Then see to it that it won't start when restarting the computer:
sudo systemctl disable mysql.service

Serafim
- 495
-
It gives update-rc.d: error: Permission denied. Would it pose a problem sir? – Hakan Demir Jul 11 '20 at 08:23
-
-
update-rc.d: error: Permission denied
. Would it pose a problem sir? – Hakan Demir Jul 11 '20 at 08:20