Skip to content

Instantly share code, notes, and snippets.

@jimrubenstein
Created March 5, 2015 14:28
Show Gist options
  • Select an option

  • Save jimrubenstein/317467dc97fc436e994e to your computer and use it in GitHub Desktop.

Select an option

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