Watchdog::Mysql - Test status of Mysql service
use Watchdog::Mysql; $h = new Watchdog::Mysql($name,$host,$port,$db); ($alive,$error) = $h->is_alive; print $h->id, $alive ? ' is alive' : " is dead: $error", "\n";
Watchdog::Mysql is an extension for monitoring a Mysql server.
Returns a new Watchdog::Mysql object. $name is a string which will identify the service to a human (default is 'mysql'). $host is the hostname which is running the service (default is 'localhost'). $port is the port on which the service listens (default is 3306). $db is a database with no access control (default is 'test').
Return a string describing the Mysql service.
Returns (1,undef) if the mysql server can be 'pinged' or (0,$error) where $error is a DBI error string if it can't.
Paul Sharpe <firstname.lastname@example.org>
Copyright (c) 1998 Paul Sharpe. England. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.