标签:bsp slist one done cat line lin read roo
show processlist中kill锁表语句与慢sql1 单个kill
mysql> show processlist;
mysql > kill 251;
#批量kill
1)查找Lockd语句
mysql -uroot -p123456 -h 192.1.20.101 -e "show processlist" | grep -i 'Locked' > locked_log.txt
2)组合kill
for line in `cat locked_log.txt | awk '{print $1}'`
do
echo "kill $line;" >> kill_thread_id.sql
done
3)执行
mysql>source kill_thread_id.sql
show processlist中kill锁表语句与慢sql
标签:bsp slist one done cat line lin read roo
原文地址:http://blog.51cto.com/11310506/2071463