RE: Watchdog für mysql in Perl?

2002-01-04 Thread Gary . Every
I use a simple script that does the following: --- snip --- mysql -e "SELECT * from table_name limit 1" db > 2>/tmp/filename x=`cat /tmp/filename` if [ "$x" = "" ] then do_nothing=1 else ## There's an issue! echo "ERROR!" fi --- end snip --- Using the re-direct of stderr is the key. the "2>/tmp/

Re: Watchdog für mysql in Perl?

2002-01-04 Thread Erik Price
Well, you could use a shell script to run "mysqladmin status". I.e. this bash script: #! /bin/bash # mystatus.sh is really just a simple alias for a # longer command. # Usage: 'mystatus.sh PASSWORD' # replace values of $my_hostname and $my_username if needed my_hostname='localhost' my_usernam