Perl script for mysql up-time report. Monitor your mysql servers up-time status from single server. Prerequisite. 1, Apache server 2, Perl modules: DBI, CGI Create one common user to connect mysql servers. mysql > GRANT usage ON *.* TO 'mysqlmon'@'192.168.0.1' IDENTIFIED BY ‘mon123'; Script #!/usr/bin/perl use CGI qw(:standard); use DBI; my $user= "mysqlmon"; my $pass= [...]
MySQL Error monitoring script. If you are using MySQL community edition you won’t get any tools to get automatic alerts of any error which has been triggered by MySQL server. For getting those alerts you have to go and check manually in the error file. Here I have created a simple shell script which will [...]
Here is the script to take full backup from replication server with out blocking production server. It is very useful for point in time recovery if you have binary log enabled ################################################################## #!/bin/sh # database backup script echo "Starting backup program....."; backupdir="/bkp/fullbkp/"; bdate=`eval date +'%d-%b-%Y-%A'`; #echo -e $bdate; # MySQL Login information master_user="root"; master_pwd="<password>"; master_host="localhost"; [...]