如何更改只读权限以设置MySQL服务器系统变量的新值 [英] How to change read-only permission to set new value of MySQL server system variable

查看:74
本文介绍了如何更改只读权限以设置MySQL服务器系统变量的新值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是MySQL的新手;最近,我在为系统变量设置新值时遇到了这个问题.

I am new to MySQL; recently I faced this problem while setting a new value for a system variable.

我尝试过:

mysql> set global innodb_ft_min_token_size = 6;

但我收到此错误:

ERROR 1238 (HY000): Variable 'innodb_ft_min_token_size' is a read only variable

是否可以更改只读权限?我读到有关 InnoDB参数,但无法解决问题

Is there any way to change the read only permission? I read about InnoDB parameters but could not resolve the problem.

推荐答案

The site you linked contains all information needed:

系统变量true或false可以在服务器启动时通过将其命名为[...]

System variables that are true or false can be enabled at server startup by naming them [...]

采用数字值的系统变量可以在命令行上指定为--var_name = value或在选项文件中指定为var_name = value.

System variables that take a numeric value can be specified as --var_name=value on the command line or as var_name=value in option files.

许多系统变量可以在运行时更改(请参见第5.1.5.2节动态系统变量").

Many system variables can be changed at runtime (see Section 5.1.5.2, "Dynamic System Variables").

innodb_ft_min_token_size 是不是动态变量,因此您必须更改配置文件 my.cnf 并添加 innodb_ft_min_token_size = 6 .或者,您需要更改MySQL服务器的启动命令.

The innodb_ft_min_token_size is not a dynamic variable so you will have to change the config file my.cnf and add innodb_ft_min_token_size=6. Alternatively you need to change the startup command of your MySQL server.

更改后,您必须重新启动MySQL服务器.

After the change you must restart your MySQL server.

这篇关于如何更改只读权限以设置MySQL服务器系统变量的新值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆