查看mysql server超时时间: MariaDB [(none)]> use xspeeder; MariaDB [xspeeder]> show global variables like ‘%timeout%‘; +----------------------------+----------+ | Variable_name | Value | +----------------------------+----------+ | connect_timeout | 10 | | deadlock_timeout_long | 50000000 | | deadlock_timeout_short | 10000 | | delayed_insert_timeout | 300 | | innodb_lock_wait_timeout | 50 | | innodb_rollback_on_timeout | OFF | | interactive_timeout | 28800 | | lock_wait_timeout | 31536000 | | net_read_timeout | 30 | | net_write_timeout | 60 | | slave_net_timeout | 3600 | | thread_pool_idle_timeout | 60 | | wait_timeout | 28800 | +----------------------------+----------+ 设置超时时间,临时生效(以秒为单位): msyql> set global wait_timeout=86400; msyql> set global interactive_timeout=86400; 修改配置文件/etc/my.cnf.d/server.conf 在 [mysqld]下添加 wait_timeout=86400 默认超时时间是28800即8个小时86400为24个小时
时间: 2024-10-14 23:03:14