mysql异常Lock wait timeout exceeded; try restarting transaction
mysql中使用update语句更新数据报错: Lock wait timeout exceeded; try restarting transaction。
这是由于你要更新的表的锁在其它线程手里。假设没有意外的话。非常可能是在事务线程中持有该锁,办法就是杀掉这条线程。
用 show full processlist 查询当前数据库全部线程
用 SELECT * FROM information_schema.INNODB_TRX 查询数据库事务表。当中trx_mysql_thread_id为事务线程的id,參照show full processlist命令中的线程信息。
使用命令:kill 事务线程id 杀掉它。比如:kill 99999
再用 show full processlist 查询当前数据库全部线程,发现刚才的线程没了。
最后再次运行更新语句。
mysql异常Lock wait timeout exceeded; try restarting transaction的更多相关文章
- mysql 异常 Lock wait timeout exceeded; try restarting transaction;expc=java.sql.SQLExcept
		这种一般是等锁超时了,可以设置延长等锁时间. mysql> set innodb_lock_wait_timeout=100 Query OK, 0 rows affected (0.02 se ... 
- 排查mysql innodb Lock wait timeout exceeded; try restarting transaction的问题
		OMG写的时候崩溃了一次. 触发关注这个问题的事情是 我们在使用pt-online-schedule 改表的时候总是拿不到锁,并且报出mysql innodb Lock wait timeout ex ... 
- com.mysql.jdbc.exceptions.jdbc4.MySQLTransactionRollbackException: Lock wait timeout exceeded; try restarting transaction
		本文为博主原创: 以下为在程序运行过程中报的错误, org.springframework.dao.CannotAcquireLockException: ### Error updating dat ... 
- MySQL事务锁等待超时 Lock wait timeout exceeded; try restarting transaction
		工作中处理定时任务分发消息时出现的问题,在查找并解决问题的时候,将相关的问题博客收集整理,在此记录下,以便之后再遇到相同的问题,方便查阅. 问题场景 问题出现的场景: 在消息队列处理消息时,同一事务内 ... 
- Mysql事物锁等待超时(Lock wait timeout exceeded; try restarting transaction)
		一.问题描述 在做查询语句时,MySQL 抛出了这样的异常:锁等待超时 Lock wait timeout exceeded; try restarting transaction,是当前事务在等待其 ... 
- mysql死锁,等待资源,事务锁,Lock wait timeout exceeded; try restarting transaction解决
		前面已经了解了InnoDB关于在出现锁等待的时候,会根据参数innodb_lock_wait_timeout的配置,判断是否需要进行timeout的操作,本文档介绍在出现锁等待时候的查看及分析处理: ... 
- mysql Lock wait timeout exceeded; try restarting transaction解决
		前面已经了解了InnoDB关于在出现锁等待的时候,会根据参数innodb_lock_wait_timeout的配置,判断是否需要进行timeout的操作,本文档介绍在出现锁等待时候的查看及分析处理: ... 
- Mysql错误:ERROR 1205 (HY000): Lock wait timeout exceeded; try restarting transaction
		昨晚添加完索引之后, 查询整表的时候抛出Lock wait timeout exceeded; try restarting transaction, 吓死小白的我, 为什么条件查询可以, 整表查不了 ... 
- MySQL应用报错:java.sql.SQLException: Lock wait timeout exceeded; try restarting transaction
		开发反馈,某业务系统插入一条记录的时候,日志报错,插入失败: ### Error updating database. Cause: java.sql.SQLException: Lock wait ... 
随机推荐
- matplotlib 可视化 —— 定制 matplotlib
			1. matplotlibrc 文件 matplotlib使用matplotlibrc [matplotlib resource configurations] 配置文件来自定义各种属性,我们称之为 ... 
- 使用Java操作Redis(二)
			上篇文章中我们可以看到,通过自己动手编码来操作Redis是相当繁琐的,实际上我们在重复制造轮子.Redis网站上列举出了一些方便操作Redis的常用工具. 可供Java选择的比较多,这里介绍一下Jed ... 
- <Sicily>Polynomial
			一.题目描述 Given a polynomial and the value of the variable x, you task is to calculate the value of the ... 
- Chromium Graphics:  Graphics and Skia
			Graphics and Skia Chrome uses Skia for nearly all graphics operations, including text rendering. GDI ... 
- unity 5.6.1 Oculus手柄输入问题
			unity文档中提到 轴的 ID 是5和6,但是测试后发现,ID是6和7,很坑 void Update () { if (Input.GetKeyDown(KeyCode.JoystickButton ... 
- 无比强大!Python抓取cssmoban网站的模版并下载
			Python实现抓取http://www.cssmoban.com/cssthemes网站的模版并下载 实现代码 # -*- coding: utf-8 -*- import urlparse imp ... 
- Hadoop2 伪分布式部署
			一.简单介绍 二.安装部署 三.执行hadoop样例并測试部署环境 四.注意的地方 一.简单介绍 Hadoop是一个由Apache基金会所开发的分布式系统基础架构,Hadoop的框架最核心的设计就是: ... 
- C#文件拖放至窗口的ListView控件获取文件类型
			using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; usin ... 
- jquery 表单重置通用方法
			$("#form_id").find(":input").not(":button,:submit,:reset,:hidden").val ... 
- VC双缓冲画图技术介绍
			双缓冲画图,它是一种主要的图形图像画图技术.首先,它在内存中创建一个与屏幕画图区域一致的对象,然后将图形绘制到内存中的这个对象上,最后把这个对象上的图形数据一次性地拷贝并显示到屏幕上. 这样的技术能够 ... 
