MySQL锁表解锁

发布时间: 2023-11-21 12:55 阅读: 文章来源:1MUMB4476PS
#查找锁mysql> show OPEN TABLES where In_use > 0;#查询是否锁表mysql> show processlist #查询表被锁进程mysql> show engine innodb status;#查询innodb引擎的运行时信息mysql> select * FROM INFORMATION_SCHEMA.INNODB_TRX;#查看正在执行的事务mysql> select * FROM INFORMATION_SCHEMA.INNODB_LOCKS; #查看正在锁的事物mysql> select * FROM INFORMATION_SCHEMA.INNODB_LOCK_WAITS;#查看等待锁的事物#解锁mysql> select * FROM INFORMATION_SCHEMA.INNODB_TRX; #查询 trx_mysql_thread_id然后执行 kill 线程IDmysql> kill id#删除进程
•••展开全文