Skip to content

Instantly share code, notes, and snippets.

@jimrubenstein
Created March 5, 2015 14:28
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 jimrubenstein/317467dc97fc436e994e to your computer and use it in GitHub Desktop.
Save jimrubenstein/317467dc97fc436e994e to your computer and use it in GitHub Desktop.
$ mysql -e 'show slave status \G' -u root | grep "Running: No"
$ echo $?
1
$ mysql -e 'show slave status \G' -u root | grep "Running"
Slave_IO_Running: Yes
Slave_SQL_Running: Yes
$ echo $?
0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment