How To Start, Stop, and Restart Apache and MySQL on Ubuntu


Apache:



To Start Apache:

sudo /etc/init.d/apache2 start


Ubuntu  - Start Apache /etc/init.d/apache2 start



To Stop Apache:

sudo /etc/init.d/apache2 stop


Ubuntu Stop Apache Web Server sudo /etc/init.d/apache2 stop


To Restart Apache:

sudo /etc/init.d/apache restart


Ubuntu - Restart Apache Web Server - sudo /etc/init.d/apache2 retsrat







MySQL:



To Start MySQL:

sudo start mysql


Ubuntu - Start MySQL Server - sudo start mysql


or

sudo service mysql start


Ubuntu Start MySQL Service - sudo service mysql start


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


Ubuntu Start MySQL Server - Version 3 (older method) - sudo /etc/init.d/mysql start




To Stop MySQL:

sudo stop mysql


Ubuntu Stop MySQL (Newer Method) sudo stop mysql


or
sudo service mysql stop

Ubuntu Stop MySQL (Other Newer Method) sudo service mysql stop

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


Stop MySQL service version 3 (old method) sudo /etc/init.d/mysql stop




To Restart MySQL:

sudo restart mysql


ubuntu restart mysql - sudo restart mysql


or
sudo service mysql restart


Ubuntu restart mysql command - sudo service mysql restart


or
sudo /etc/init.d/mysql restart


Ubuntu Restart MySQL init.d method


 
Source from http://mixeduperic.com

No comments :

Post a Comment