#!/bin/bash
passwd=“"for id in `mysql -uxsjwslm_js -p$passwd -e "show processlist"|awk '/Sleep/{print $1}'`domysql -uxsjwslm_js -p$passwd -e "kill $id"echo `date +"%F %T"` "kill $id" >> ar/log/mysql_kill_sleep.logdone本文共 274 字,大约阅读时间需要 1 分钟。
#!/bin/bash
passwd=“"for id in `mysql -uxsjwslm_js -p$passwd -e "show processlist"|awk '/Sleep/{print $1}'`domysql -uxsjwslm_js -p$passwd -e "kill $id"echo `date +"%F %T"` "kill $id" >> ar/log/mysql_kill_sleep.logdone转载于:https://www.cnblogs.com/zhangfu/p/10364616.html