MySQL drop空表时处于Waiting for table metadata lock状态,解决办法
2015-09-11 09:25
579 查看
#将以下语句修改一下后复制粘贴到linux命令行方法1:alias db_conn="mysql -h 127.0.0.1 -uroot -proot@123 -P 3320"db_conn -ss -e "
select concat(\"kill \",b.ID,\";\") as kill_id from information_schema.INNODB_TRX a,information_schema.PROCESSLIST b where a.trx_mysql_thread_id=b.ID and a.trx_state='RUNNING' and b.TIME >=30; "|db_conn
方法2:
alias
db_conn="mysql -h 127.0.0.1 -uroot -proot@123 -P
3320"
db_conn -ss -e "select
concat(\"kill \",trx_mysql_thread_id,\";\") as kill_id from
information_schema.INNODB_TRX where trx_lock_structs=0 and
trx_weight=0 and trx_rows_locked=0 and trx_rows_modified=0 and
trx_state='RUNNING';"|db_conn
select concat(\"kill \",b.ID,\";\") as kill_id from information_schema.INNODB_TRX a,information_schema.PROCESSLIST b where a.trx_mysql_thread_id=b.ID and a.trx_state='RUNNING' and b.TIME >=30; "|db_conn
方法2:
alias
db_conn="mysql -h 127.0.0.1 -uroot -proot@123 -P
3320"
db_conn -ss -e "select
concat(\"kill \",trx_mysql_thread_id,\";\") as kill_id from
information_schema.INNODB_TRX where trx_lock_structs=0 and
trx_weight=0 and trx_rows_locked=0 and trx_rows_modified=0 and
trx_state='RUNNING';"|db_conn
相关文章推荐
- rails 第一个动作
- Understanding Explain Plan
- Rails 新建项目
- linux /dev/console设备解析 http://blog.csdn.net/wangrunmin/article/details/7577807
- 认证流程【2】-main_loop函数
- 认证流程【1】-main函数
- [?]Factorial Trailing Zeroes
- Leetcode NO.220 Contains Duplicate III
- Leetcode NO.219 Contains Duplicate II
- Contains Duplicate 解答
- Communications link failure,The last packet succes
- zabbix 邮件报警 -- sendmail
- 15_09_10 contains 错误用法
- Git push 报错 "error: failed to push some refs to " 解决
- Failed to complete gradle execution.
- int main( int argc, char ** argv)在VS2008中的配置的一个实例
- Rails进阶参考
- 使用Genymotion安装APK出现错误INSTALL_FAILED_CPU_ABI_INCOMPATIBLE的解决办法
- LEETCODE-Contains Duplicate
- Leet Code 11 Container With Most Water