• MySQL drop空表时处于Waiting for table metadata lock状态,解决办法


    #将以下语句修改一下后复制粘贴到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

    版权声明:QQ:597507041

  • 相关阅读:
    修改spring boot 启动logo
    查看jvm常用命令
    intellij IDEA破解
    hdu 新生晚会
    How many prime numbers(素数)
    2077 汉诺塔IV
    Factorial
    双人黑白块
    EasyX
    七夕情人节
  • 原文地址:https://www.cnblogs.com/spzhangfei/p/4801773.html
Copyright © 2020-2023  润新知