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
Subscribe to our free e-mail newsletter or RSS feed to get all updates.
You can Email this page to a friend.
Related Linux / UNIX FAQ:
- Securing MySQL server
- How do I access MySQL server from the shell prompt (command line)?
- MySQL startup script under BSD/Linux
- /usr/libexec/mysqld: Can’t create/write to file ‘/tmp/’ (Errcode: 13)
- How do I start MySQL server without using startup script /etc/init.d/mysql?
Leave a Reply
We encourage your comments, and suggestions. But please stay on topic, be polite, and avoid spam. Please do not use the comment form to ask for help / question. Ask your question on the excellent Linux tech support forum. Thank you very much for stopping by our site!
Tags: /etc/init.d/mysql, database server, mysql database, mysql script, mysql server, server service, server task, service command, shell, Ubuntu Linux ~ Last updated on: May 7, 2008




Recent Comments
Today ~ 3 Comments
Today ~ 19 Comments
Today ~ 2 Comments
Today ~ 37 Comments
Today ~ 46 Comments