在mysql配置文件里添加wait_timeout和interactive_timeout两个值

[mysqld]

wait_timeout=315360000
interactive_timeout=315360000

超时时间,10年

重启mysql,

登入mysql 

 show variables like '%timeout%'; 

+-----------------------------+----------+

| Variable_name               | Value    |

+-----------------------------+----------+

| interactive_timeout         | 31536000 |

| wait_timeout                | 31536000 |

+-----------------------------+----------+

13 rows in set (0.00 sec)

看到值已经改变,设置成功

相关文章:

  • 2022-02-12
  • 2022-12-23
  • 2022-12-23
  • 2021-12-06
  • 2022-02-18
  • 2022-12-23
猜你喜欢
  • 2022-02-18
  • 2022-12-23
  • 2021-12-30
  • 2021-09-30
  • 2021-12-01
相关资源
相似解决方案