MySQL drop empty table in waiting for table metadata lock State, workaround (from Network)

Source: Internet
Author: User

MySQL drop empty table is in waiting for table metadata lock state, simple rough solution, original reason please crossing net

1. mysql> 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;

2. Mysql> 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 ';

Either of the two steps above is optional
Mysql> Kill kill_id

This approach is a palliative, but a temporary solution.

MySQL drop empty table in waiting for table metadata lock State, workaround (from Network)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.