mysqladmin shotdown


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

Can't find a solution to reboot mysql

  • 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

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>

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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