Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

running

mysqladmin shotdown

gives

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

Can't find a solution to reboot mysql

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

1 Answer 1

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

 
discard

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.