Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top


mysqladmin shotdown


mysqladmin: connect to server at 'localhost' failed
error: 'Too many connections'

Can't find a solution to reboot mysql

share|improve this question
/etc/init.d/mysql restart – Nathan C Sep 6 '13 at 18:55
@nathanC Might need to kill the process first, depending on how screwed it is. – Satanicpuppy Sep 6 '13 at 18:57
up vote 4 down vote accepted

Try sending killall -sigterm mysqld. Mysql should capture the signal and gracefully shut down without needing to create a connection to the server. If you are running multiple parallel instances of mysqld, and only wish to shut down one, you'll have to figure out which instance you want to kill, either by netstat -lnp and pick the listening port associated, or lsof -n and locate the database storage path for the instance you wish to stop. Then using the discovered pid, kill -sigterm <pid>

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.