MySQL 的“net_buffer_length”配置如何查看和重置?

MySQL 的“net_buffer_length”配置如何查看和重置?

在重置之前尝试查看“net_buffer_length”配置:

mysql> show variables like "net_buffer_length";
+-------------------+-------+
| Variable_name     | Value |
+-------------------+-------+
| net_buffer_length | 16384 |
+-------------------+-------+
1 row in set (0.00 sec)

尝试重置“net_buffer_length”配置:

mysql> set global net_buffer_length=1000000;
Query OK, 0 rows affected (0.00 sec)

尝试确认“net_buffer_length”配置已重置:

mysql> show variables like "net_buffer_length";
+-------------------+-------+
| Variable_name     | Value |
+-------------------+-------+
| net_buffer_length | 16384 |
+-------------------+-------+
1 row in set (0.00 sec)

我使用的命令有什么问题导致配置无法更新?


  • MySQL 服务器版本:5.1.53-社区
  • 数据库引擎:数据库

问题、反馈、请求——只需评论,谢谢!

答案1

来自MySQL 系统变量页面net_buffer_length

As of MySQL 5.1.31, the session value of this variable is read only. 
Before 5.1.31, setting the session value is permitted but has no effect. 

相关内容