Search This Blog

Monday, March 19, 2007

Script to flush logs from replicant host to master

#!/bin/sh
# Format host:username:password
hosts="host1:username1:password1 host2:username2:password2"

###
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin
for system in $hosts ; do
host=`echo $system | cut -d : -f 1`
user=`echo $system | cut -d : -f 2`
password=`echo $system | cut -d : -f 3`

log=`mysql -S /tmp/$host-mysql.sock -B --skip-column-names mysql -e "show slave status" | cut -f 6`

if [ ${log} ]; then
mysql -h $host -u $user -p$password -e "PURGE MASTER LOGS TO '$log';"
fi
pid="/home/$host/`hostname`.pid"
kill -HUP `cat $pid`
done

8 comments:

Anonymous said...

If you could e-mail me with a few suggestions on just how you made your blog look this excellent, I would be grateful.

chenlili said...

2016-4-21 xiaobao
longchamp handbags
christian louboutin outlet
cheap jordan shoes
louis vuitton handbags
coach outlet online
air jordan retro
polo ralph lauren
toms shoes
oakley outlet
adidas uk
michael kors outlet clearance
jordans
fitflop sandals
coach outlet
ray ban sunglasses
michael kors handbags
coach factorty outlet
nike outlet store
tory burch outlet
nike outlet store
ray ban
adidas originals
ugg boots
ray ban wayfarer
ray ban sunglasses
polo ralph lauren
oakley vault
coach factory outlet
christian louboutin outlet
louis vuitton handbags
michael kors outlet online
jordan 8s
michael kors outlet
coach factory outlet
adidas originals shoes
ray ban sunglasses
jordan 13
true religion outlet
air jordans
vans shoes

Unknown said...

ralph lauren outlet
louis vuitton bags
hollister
longchamp pliage
timberland boots
pandora jewelry
ralph lauren uk
coach outlet canada
michael kors outlet online
nike roshe run shoes
adidas trainers
michael kors handbags
new balance shoes
ugg sale
rolex uk
chaussure louboutin
vans shoes
longchamp pliage
tory burch outlet online
cheap michael kors handbags
asics
coach outlet
ghd hair straighteners
mizuno running shoes
cartier watches
michael kors outlet
cartier watches
bottega veneta outlet online
nike outlet store
tiffany jewellery
nike free running
beats headphones
kobe shoes
coach outlet
nike trainers uk
czq20160726

chenmeinv0 said...

ugg outlet
vikings jerseys
oakley sunglasses outlet
coach outlet
coach factory outlet
mbt shoes men
louboutin uk
adidas outlet
ray ban glasses
ugg boots
20172.6chenjinyan

Unknown said...

pandora bracelet
polo ralph lauren outlet online
cheap oakley sunglasses
louboutin shoes
michael kors outlet store
michael kors handbags outlet
adidas yeezy boost
pandora jewelry outlet
michael kors uk
bercrombie
xushengda0528

Unknown said...

ralph lauren outlet
nike blazer shoes
ugg boots clearance
oakley sunglasses
carrera sunglasses
nike outlet
michael kors outlet
air jordans
ralph lauren outlet
cheap nfl jerseys
20179.4wengdongdong

fangyaoting said...

20180616 junda
bucks jerseys
pandora
adidas soccer shoes
oakley sunglasses
polo ralph lauren
celtics jerseys
coach outlet canada
dolce and gabbana
fendi handbags
saucony shoes

sandy said...

https://khalejmovers.com/شركة-نقل-عفش-من-جدة-الى-الامارات/


https://khalejmovers.com
https://khalejmovers.com/شركة-شحن-من-الرياض-لمصر/
https://khalejmovers.com/شركة-نقل-عفش-من-الدمام-الى-الامارات/