UnixServerAdmin

Server Administration & Management

mysql_replication_slave.sh

mysql -uroot -pPASSWORD  -e “show slave statusG;” | grep Slave >> /REPORTS/mysql_$(date +%d%m%y%H)

echo ” ” >> /REPORTS/mysql_$(date +%d%m%y%H)

mysql -uroot -pPASSWORD  -e “show slave statusG;” | grep Second >> /REPORTS/mysql_$(date +%d%m%y%H)

echo ” ” >> /REPORTS/mysql_$(date +%d%m%y%H)

mysql -uroot -pPASSWORD  -e “show slave statusG;” | grep Last_Error >> /REPORTS/mysql_$(date +%d%m%y%H)

echo ” ” >> /REPORTS/mysql_$(date +%d%m%y%H)

mysql -uroot -pPASSWORD  -e “show slave statusG;” | grep Last_SQL_Error >> /REPORTS/mysql_$(date +%d%m%y%H)

echo ” ” >> /REPORTS/mysql_$(date +%d%m%y%H)

mutt -s “MYSQL REPLICATION STATUS REPORT – IP – 192.168.1.X” info@unixserveradmin.com < /REPORTS/mysql_$(date +%d%m%y%H)

mutt -s “MYSQL REPLICATION STATUS REPORT – IP – 192.168.1.X” unixserv@unixserveradmin.com < /REPORTS/mysql_$(date +%d%m%y%H)

January 3, 2012 - Posted by | MySQL, Shell Script | ,

1 Comment »

  1. I have been surfing online greater than 3 hours as of late, yet I never found any attention-grabbing article like yours. It’s beautiful worth sufficient for me. Personally, if all webmasters and bloggers made just right content as you did, the internet will likely be much more useful than ever before.

    Comment by differential backup vs incremental | January 27, 2012 | Reply


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: