MySQL max_allowed_packet param什么是catch? [英] MySQL max_allowed_packet param whats the catch?
问题描述
我需要增加max_allowed_packet参数,以适应一些理论上非常大的项目。如果我设置这个参数说10M,什么价格,如果我支付相比设置为1M或4M。
感谢任何输入!
Tomas
I need to increase the max_allowed_packet param, to fit some theoretically very large items. If I set this param to say 10M, what price if any am I paying compared to setting it to 1M or 4M. Thanks for any input! Tomas
推荐答案
我发现这个解释: http://www.astahost.com /info.php/max_allowed_packet-mysql_t2725.html
可以安全地增加
的值这个变量,因为额外的内存
只在需要时分配。对于
示例,mysqld仅在发出长查询时分配更多的内存
,或者当mysqld必须返回大的结果
行时分配
。
变量的小默认值是一个预防措施,以捕获客户端
和服务器之间的
不正确的数据包,并且还要确保您
不会耗尽内存,因为使用大
包意外。
It's safe to increase the value of this variable because the extra memory is allocated only when needed. For example, mysqld allocates more memory only when you issue a long query or when mysqld must return a large result row. The small default value of the variable is a precaution to catch incorrect packets between the client and server and also to ensure that you don't run out of memory by using large packets accidentally.
还要注意,我读你必须更改mysql客户端和mysql的值服务器。
Also note that I read you have to change the value for both the mysql client and the mysql server.
这篇关于MySQL max_allowed_packet param什么是catch?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!