mysql增加超时时间_mysql 超时时间

小结:

1、mysql服务端主动关闭链接的秒数;

MySQL :: MySQL 8.0 Reference Manual :: 5.1.8 Server System Variables https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_interactive_timeout

PropertyValue

Command-Line Format

--interactive-timeout=#

Scope

Global, Session

Dynamic

Yes

SET_VAR Hint Applies

No

Type

Integer

Default Value

28800

Minimum Value

1

The number of seconds the server waits for activity on an interactive connection before closing it. An interactive client is defined as a client that uses theCLIENT_INTERACTIVE option to mysql_real_connect(). See also wait_timeout.

PropertyValue

Command-Line Format

--wait-timeout=#

System Variable

Scope

Global, Session

Dynamic

Yes

SET_VAR Hint Applies

No

Type

Integer

Default Value

28800

Minimum Value

1

Maximum Value (Other)

31536000

Maximum Value (Windows)

2147483

The number of seconds the server waits for activity on a noninteractive connection before closing it.

On thread startup, the session wait_timeout value is initialized from the global wait_timeout value or from the global interactive_timeout value, depending on the type of client (as defined by the CLIENT_INTERACTIVE connect option to mysql_real_connect()). See also interactive_timeout.

案例:

show GLOBAL VARIABLES  like '%timeout%';

Variable_name Value

connect_timeout10

delayed_insert_timeout300

failover_resend_timeout

have_statement_timeoutYES

innodb_flush_log_at_timeout1

innodb_lock_wait_timeout50

innodb_rollback_on_timeoutOFF

interactive_timeout7200

lock_wait_timeout31536000

net_read_timeout30

net_write_timeout60

rocksdb_io_write_timeout0

rocksdb_lock_wait_timeout1

rpl_semi_sync_master_timeout1000

rpl_semi_sync_slave_kill_conn_timeout5

rpl_stop_slave_timeout31536000

slave_net_timeout60

thread_pool_idle_timeout60

tokudb_last_lock_timeout

tokudb_lock_timeout4000

tokudb_lock_timeout_debug1

wait_timeout86400

版本

show GLOBAL VARIABLES  like '%version%';

Variable_name Value

innodb_version5.6.16

protocol_version10

slave_type_conversions

tls_versionTLSv1,TLSv1.1,TLSv1.2

tokudb_version7.5.6

version5.6.16-log

version_commentSource distribution

version_compile_compilerGNU

version_compile_compiler_major4

version_compile_compiler_minor8

version_compile_machinex86_64

version_compile_osLinux

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值