2014-05-15 27 views

回答

7

The site you linked包含了所需的所有信息:

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

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.

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

innodb_ft_min_token_size is not a dynamic variable,所以你将不得不更改配置文件my.cnf并添加innodb_ft_min_token_size=6。或者,您需要更改MySQL服务器的启动命令。

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

+0

我做这些事情,但仍然没有得到修改后的值。 – Rocoder

+1

我正在使用链接文件访问my.cnf,现在在'/ etc'里面修改了my.cnf,所以现在我可以看到更改了。 – Rocoder

1

试试这个: 在/etc/mysql/my.cnf文件(在你的情况下的位置可能会有所不同,做locate my.cnf找到您的系统中的位置),添加/修改:

[mysqld] 
innodb_ft_min_token_size = 2 

到最低限度设置为2。 不要忘记重新启动mysql服务器并重建全文索引。对我而言,下面的工作就像一个魅力。

drop index index_stem on maps; 
CREATE FULLTEXT INDEX index_stem ON maps(stem_value);