MySQL和相关的timeout详细解析


本文摘自PHP中文网,作者小云云,侵删。

查询mysql库时, 在数据量比较大时,会话总断。刚开始以为是mysql的和连接有关timeout的问题,结果是网络的不稳定的原因。 本文主要介绍了MySQL和连接相关的timeout 的详细整理的相关资料,本文主要总结下和连接有关的timeout,需要的朋友可以参考下,希望能帮助到大家。

下面总结下和连接有关的timeout

slave-net-timeout

The number of seconds to wait for more data from the master before the slave considers the connection broken, aborts the read, and tries to reconnect. The first retry occurs immediately after the timeout. The interval between retries is controlled by the MASTER_CONNECT_RETRY option for the CHANGE MASTER TO statement, and the number of reconnection attempts is limited by the --master-retry-count option. The default is 3600 seconds (one hour).
当slave认为连接master的连接有问题时,就等待N秒,然后断开连接,重新连接master

net_read_timeout :

The number of seconds to wait for more data from a connection before aborting the read. When the server is reading from the client, net_read_timeout is the timeout value controlling when to abort
在终止读之前,从一个连接获得数据而等待的时间秒数;当服务正在从客户端读取数据时,net_read_timeout控制何时超时。

net_write_timeout:

The number of seconds to wait for a block to be written to a connection before aborting the write.When the server is writing to the client, net_write_timeout is the timeout value controlling when to abort。
在终止写之前,等待多少秒把block写到连接;当服务正在写数据到客户端时,net_write_timeout控制何时超时

wait_timeout

阅读剩余部分

相关阅读 >>

mysql什么是事务处理 ?(代码示例)

如何在linux中重置mysql root密码

总结mysql数据库与表的基本常用命令

mysql 3306端口不能访问怎么办

mysql中rlike运算符的使用详解

mysql数据库密码如何修改?

mysql如何连接数据库

mysql笔记之视图的使用详解

mysql 出现1071错误怎么办

大公司mysql集群用什么

更多相关阅读请进入《timeout》频道 >>


数据库系统概念 第6版
书籍

数据库系统概念 第6版

机械工业出版社

本书主要讲述了数据模型、基于对象的数据库和XML、数据存储和查询、事务管理、体系结构等方面的内容。



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...