blank
blank
发布于 2019-07-29 / 782 阅读 / 0 评论 / 0 点赞

mysql 的锁等待超时解决 [mysql Lock wait timeout execeded; try restarting transaction]

mysql Lock wait timeout execeded; try restarting transaction

1

SELECT trx_id, trx_requested_lock_id, trx_mysql_thread_id, trx_query FROM information_schema.innodb_trx WHERE trx_state = 'LOCK WAIT';

kill {trx_mysql_thread_id}

编辑 mysql 配置文件 添加/修改 innodb_lock_wait_timeout = 500

vim /etc/my.cnf

3

重启 mysql

systemctl restart mysqld

4


评论