Server starten & stoppen (MySQL)
Er zijn verschillende manieren om een mysql-server (deamon; service; server) te starten, te stoppen of te herstarten. Dit artikel beperkt zicht tot systemctl om dit te doen.
Service name achterhalen
Gebruik
systemctl --all | grep mysql
om de service name te achterhalen. Output die ik krijg:
mysql.service loaded active running MySQL Community Server
De service name is dus mysql.service.
Stop
systemctl stop mysql.service
Status
systemctl status mysql.service
Start
systemctl start mysql.service
Restart
systemctl restart mysql.service