今天在进行表操作的时候,改了了字段alter table name drop column等,然后这张表都卡死了。涉及到此表的所有操作页面一直pending。数据库也打不开此表
查看哪些运行的命令造成,如sql语句等
select id, db, user, host, command, time, state, info
from information_schema.processlist
where command != 'Sleep'
order by time desc ;
那个端口运行了命令和命令执行的开始时间,根据端口开始时间长的将它杀死
查看端口运行的命令和执行的时间,将端口运行时间长的杀死
select * from information_schema.innodb_trx;
问题解决,能正常打开此表和相关sql操作
show processlist; 也可以查看卡死的sql,sql语句在info里面,没有则无