Mysql try restarting transaction怎么解决,排查事务锁表
查看当前事务trx_mysql_thread_id
select * from information_schema.INNODB_TRX ;
执行kill命令杀掉进程
kill 18531
其他命令
查看锁行的表和索引
SELECT * FROM INFORMATION_SCHEMA.INNODB_LOCKS;
查看当前等待锁事务
SELECT * FROM INFORMATION_SCHEMA.INNODB_LOCK_WAITS;
更详细参数说明可参考
https://www.cnblogs.com/agang-php/p/14493461.html
https://blog.csdn.net/java__project/article/details/100137526(推荐这篇)