使用MySQL 遇到错误:

Error Msg:

Lock wait timeout exceededtry restarting transaction 

修改方法:

我不知道MySQL能否基于Session设置timeout。但可以设置全局的引擎的timeout

my.ini 或 my.cnf(linux)中设置

 
innodb_lock_wait_timeout=600
 

原来文件中没有此设置的话把此设置与其他的innodb参数放到一起,单位为S。此值默认为50s


相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-07
  • 2022-12-23
  • 2022-12-23
  • 2021-11-08
  • 2022-12-23
猜你喜欢
  • 2021-09-24
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-07
  • 2021-05-23
相关资源
相似解决方案