≡ Menu

How To Start and Stop MySQL Database Server From A Shell Prompt

Q. How do I start and stop mysql server under Debian / Ubuntu Linux system?

A. Simply use service or /etc/init.d/mysql script to start / stop / restart mysql database server.

Task: Start mysql server

# service mysql start
# /etc/init.d/mysql start

$ sudo service mysql start
$ sudo /etc/init.d/mysql start

Task: Stop mysql server

# service mysql stop
# /etc/init.d/mysql stop

$ sudo service mysql stop
$ sudo /etc/init.d/mysql stop

To restart simply, use:
$ sudo service mysql restart
$ sudo /etc/init.d/mysql restart

Share this tutorial on:
{ 0 comments… add one }
Security: Are you a robot or human?

Leave a Comment

You can use these HTML tags and attributes: <strong> <em> <pre> <code> <a href="" title="">

   Tagged with: , , , , , , , , ,