gpt4 book ai didi

mysql - 设置全局变量不工作mysql

转载 作者:行者123 更新时间:2023-11-29 05:23:56 25 4
gpt4 key购买 nike

我最近重新安装了 MySQL 服务器,因为之前的服务器不知何故崩溃了。我想通过使用 SET GLOBAL 来更改一些服务器变量值,例如

    SET GLOBAL query_alloc_block_size = 1024

(1024 是这个变量的最小值)我正在设置动态系统变量,所以它们应该改变,但是变量的值不会改变。即使在重新启动服务器后,这些值也保持不变。什么可能导致此问题?

最佳答案

评论太长了。

我不知道为什么这在以前会奏效。 documentation很清楚:

If you change a global system variable, the value is remembered and used for new connections until the server restarts. (To make a global system variable setting permanent, you should set it in an option file.)

也许在您以前的服务器上,新值恰好与配置文件中的值匹配。

关于mysql - 设置全局变量不工作mysql,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22425463/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com