≡ 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

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

Task: Stop mysql server

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

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

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

Tweet itFacebook itGoogle+ itPDF itFound an error/typo on this page?

{ 0 comments… add one }

Leave a Comment