id=`ls -t|grep mysql-bin.0|wc -l`echo $idif [[ $id -gt 50 ]];thenls -t |grep mysql-bin.0|tail -n $(($id-50))| xargs rm -rffi
mysql进程太大 show processlistsleep进程太多 临时杀掉大于50的睡眠进程#!/bin/shuser=rootpasswd=testhost=127.0.0.1while : do n=`mysqladmin processlist -u$user -p$passwd -h$host| grep -i sleep | wc -l` date
show slave status\Gmysqlbinlog mysql-bin.001467 >test.txt找到断的点然后CHANGE MASTER TO MASTER_LOG_FILE='mysql-bin.009075',MASTER_LOG_POS=841265973;
安装yum -y install perl-IO-Socket-SSL perl-DBI perl-DBD-MySQL perl-Time-HiRestar -zxvf percona-toolkit_2.2.16-1.tar.gzcd percona-toolkit-2.1.1perl Makefile.PLmakemake testmake install pt-online-sch
Copyright © 2005-2024 51CTO.COM 版权所有 京ICP证060544号