How To Start, Stop, and Restart Apache and MySQL on Ubuntu
In this tutorial we will cover how to start, stop and restart your Apache web server and MySQL db on Ubuntu. Since most Linux servers do not have a graphical user interface installed we will do the steps in a terminal.
In this tutorial I am working with Ubuntu 11.04 Server. If you are running Apache on your Ubuntu desktop these steps will work for you as well.
Apache:
To Start Apache:
sudo /etc/init.d/apache2 start

To Stop Apache:
sudo /etc/init.d/apache2 stop

To Restart Apache:
sudo /etc/init.d/apache restart

MySQL:
To Start MySQL:
sudo start mysql

or
sudo service mysql start

or
(Note: Older Method)
sudo /etc/init.d/mysql start

To Stop MySQL:
sudo stop mysql

or
sudo service mysql stop

or
(Note: Older Method)
sudo /etc/inid.d/mysql stop

To Restart MySQL:
sudo restart mysql

or
sudo service mysql restart

or
sudo /etc/init.d/mysql restart

Hope you found this helppful!
