标签:show glob cte innodb 模式 color 就会 设置mysql 默认参数
Mysql数据库采用InnoDB模式,默认参数:innodb_lock_wait_timeout设置锁等待的时间是50s,一旦数据库锁超过这个时间就会报错。
mysql> SHOW GLOBAL VARIABLES LIKE ‘innodb_lock_wait_timeout‘;
+--------------------------+-------+
| Variable_name | Value |
+--------------------------+-------+
| innodb_lock_wait_timeout | 50 |
+--------------------------+-------+
1 row in set (0.00 sec)
mysql> SET GLOBAL innodb_lock_wait_timeout=120;
Query OK, 0 rows affected (0.00 sec)
mysql> SHOW GLOBAL VARIABLES LIKE ‘innodb_lock_wait_timeout‘;
+--------------------------+-------+
| Variable_name | Value |
+--------------------------+-------+
| innodb_lock_wait_timeout | 120 |
+--------------------------+-------+
1 row in set (0.00 sec)
mysql>
设置mysql 事务锁超时时间 innodb_lock_wait_timeout
标签:show glob cte innodb 模式 color 就会 设置mysql 默认参数
原文地址:https://www.cnblogs.com/yshyee/p/10668943.html