Apache MySQL restart stop in Ubuntu, Debian and Redhat

Posted under » MySQL » Ubuntu » Apache » Raspberry Pi updated on 11 August 2023

Apache

If Debian Service

$ service mysql start
$ service mariadb start
$ service apache2 stop

If Redhat or CentOS. Apachectl will work on Ubuntu too.

$ apachectl stop
$ apachectl restart //or
$ /sbin/service httpd restart 

Restart if Debian

$ restart mysql
$ systemctl reload apache2

To check status

$ systemctl status apache2
$ systemctl status mysql

MySql

The old command still works

$ /etc/init.d/mysql stop

For more information on Apache Ubuntu 22.04 config

web security linux ubuntu python django git Raspberry apache mysql php drupal cake javascript css AWS data