Saturday, November 19, 2011

MySQL MHA - init script

As I wrote a typical init script for mhamanager and verified the each process of running, stopping, showing the status.
Tough I used to open the script here, I moved it to my github.

  • start daemon
# /etc/init.d/mhamanager start
Starting /etc/init.d/mhamanager: nohup: appending output to `nohup.out' 
  • verify if daemon stops
# /etc/init.d/mhamanager status
app1 (pid:15293) is running(0:PING_OK), master:ha-db01
  • stop
# /etc/init.d/mhamanager stop
Shutting down /etc/init.d/mhamanager: Stopped app1 successfully.
  • verify if daemon is running
# /etc/init.d/mhamanager status
app1 is stopped(2:NOT_RUNNING). 
  • show usage
# /etc/init.d/mhamanager
Usage: /etc/init.d/mhamanager {start|stop|restart|condrestart|status|checkrepl}

1 comment:

  1. This comment has been removed by a blog administrator.