How to Start or Stop MySQL Server on Ubuntu via the Command Line

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

You might also enjoy:

About Craig Lotter

Craig Lotter is an established web developer and application programmer, with strong creative urges (which keep bursting out at the most inopportune moments) and a seemingly insatiable need to love all things animated. Living in the beautiful coastal town of Gordon's Bay in South Africa, he games, develops, takes in animated fare, trains under the Funakoshi karate style and for the most part, simply enjoys life with his amazing wife and daughter. Oh, and he draws ever now and then too.
This entry was posted in Software & Websites, Tutorials and tagged , , , , , , , , . Bookmark the permalink.
  • Flesh

    Those commands are outdated and seems not to work at all in news ubuntu releases, can you post the new stop /start and status command utilities?

blog comments powered by Disqus