Tips and Tricks

In the above example the mysqlfailover utility was started in the default console mode, but it can also be executed as a daemon. For that purpose, the --daemon option needs to be used, more specifically simply add '--daemon=start' to the command line. When mysqlfailover is executed as a daemon, no output is displayed and all the information is logged to file specified for the --log option which is mandatory in this case. To stop the execution of the mysqlfailover daemon simply invoke the utility using the option '--daemon=stop'. No other options is required to stop the daemon, unless a specific pidfile (to store the process PID) was specified with the --pidfile option to start the daemon and in this case the same option value is also required to stop it.

Another useful feature is the possibility to run external script along the execution of the utility to perform customized actions. The following options can be used to execute different scripts at distinct moments of the mysqlfailover execution: --exec-fail-check to specify a script to run periodically at each predefined interval instead of the default check (i.e., master is reachable and alive) to detect the need to failover, --exec-before to specify a script to execute before starting failover, --exec-after to execute a script at the end of failover process, --exec-post-failover to run a script after completing the failover process (before displaying the health report).

Download this Manual
PDF (US Ltr) - 1.1Mb
PDF (A4) - 1.1Mb
EPUB - 292.9Kb
HTML Download (TGZ) - 224.3Kb
HTML Download (Zip) - 236.0Kb
User Comments
Sign Up Login You must be logged in to post a comment.