ERROR 1205 (HY000): Lock wait timeout exceeded; try restarting transaction
mysql 报事务冲突;
用如下sql 查看host 及对应端口;
select * from information_schema.processlist where DB = 'database';
lsof -i:$port;
获取进程pid;并通如下命令知道具体进程;
jsp -lvm :grep $pid
kill 相应的trx_mysql_thread_id,即information_schema.processlist表中ID;
mysql> kill $trx_mysql_thread_id;

本文介绍了解决MySQL数据库中出现的ERROR1205事务冲突错误的方法。通过查询information_schema.processlist表来定位冲突的进程,使用lsof命令检查端口占用情况,找到对应的PID,最终通过kill命令终止冲突的事务。
1639

被折叠的 条评论
为什么被折叠?



