小编Che*_*dar的帖子

MySQL - wait_timeout 变量

我一直在尝试解决一个问题,我认为在 CentOS 机器上更改 MySQL (5.1.67) 中的 wait_timeout 变量可能会有所帮助。

所以,我用我想要的值 (180) 更新了 /etc/my.cnf,并重新启动了 MySQL,但现在我惊讶地发现我得到了不同的 wait_timeout 值,具体取决于我的显示方式(见下文) :

mysql> show global variables like "%wait%";
+--------------------------+-------+
| Variable_name            | Value |
+--------------------------+-------+
| innodb_lock_wait_timeout | 50    |
| table_lock_wait_timeout  | 50    |
| wait_timeout             | 180   |
+--------------------------+-------+
3 rows in set (0.00 sec)

mysql> show variables like "%wait%";
+--------------------------+-------+
| Variable_name            | Value |
+--------------------------+-------+
| innodb_lock_wait_timeout | 50    |
| table_lock_wait_timeout  | 50    |
| wait_timeout             | 28800 |
+--------------------------+-------+
3 …
Run Code Online (Sandbox Code Playgroud)

mysql waits

4
推荐指数
1
解决办法
3608
查看次数

标签 统计

mysql ×1

waits ×1