How to Start or Stop MySQL Server on Ubuntu via the Command Line CodeUnit 07 JUL 2010

To stop a MySQL server instance on an Ubuntu linux install via the command line is as simple as entering:

sudo /etc/init.d/mysql stop

Alternatively, to start a MySQL server instance you can simply submit a start command like so:

sudo /etc/init.d/mysql start

Incidentally, if you want to check on the status of a currently running MySQL server instance, you can make use of the status switch:

sudo /etc/init.d/mysql status

Oh, and if you want to install MySQL on the ubuntu machine, simply make use of the usual apt-get suspect and enter:

sudo apt-get install mysql-server

Useful little things to remember if you are working in a terminal only environment, don’t you think? :P

Related Posts:

About Craig Lotter

South African software architect and developer at Touchwork. Husband to a cupcake baker and father to two little girls. I don't have time for myself any more.