Skip to content

Instantly share code, notes, and snippets.

@AurelioDeRosa
Created April 18, 2015 19:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AurelioDeRosa/207a70c64007fc2dd05e to your computer and use it in GitHub Desktop.
Save AurelioDeRosa/207a70c64007fc2dd05e to your computer and use it in GitHub Desktop.
Script to restart MySQL if it goes down
#!/bin/sh
ps auxw | grep mysql | grep -v grep
if [ $? != 0 ]
then
sudo service mysql start
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment