在本地my.cnf中设置ft_min_word_len? [英] ft_min_word_len set in local my.cnf?
本文介绍了在本地my.cnf中设置ft_min_word_len?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以为特定用户设置ft_min_word_len(例如通过将my.cnf文件放置在设置了ft_min_word_len的用户主目录中)?文档说,进行此更改后,我需要重新启动服务器,但是用户无权执行此操作.
Is it possible to set ft_min_word_len for a certain user (such as by placing a my.cnf file in the user home dir with ft_min_word_len set)? The documentation says I need to restart the server after making this change, but a user does not have access to do that.
推荐答案
我现在正在使用它,因此可以为任何查看此内容的人提供参考...
I'm working with this now, so to add as a reference for anyone looking at this...
- 您可以在查询中使用此查询 浏览器或MySQL提示以显示 ft_min_word_len的状态:"SHOW 像"ft_min_word_len"这样的变量;"
- ft_min_word_len默认为一个值 的值为"4",默认情况下未列出 在"my.cnf"中.要更改它的默认值 值,请添加:"ft_min_word_len = 3" [mysqld]部分下的my.cnf.
- 更改值之后 ft_min_word_len,服务器必须是 重新启动.
- 更改值之后 ft_min_word_len,您拥有的所有索引 必须重建
- 重建索引的快速方法是
使用此查询:修复表
your_table_name QUICK;注意:
您正在使用表格名称
仅此名称,而不是任何索引的名称.
如果您有多个索引 针对"your_table_name"表, 所有这些都将被重建.
- You can use this query in a query browser or the MySQL prompt to show the state of ft_min_word_len: "SHOW VARIABLES LIKE 'ft_min_word_len';"
- ft_min_word_len deafults to a value of '4' and is not by default listed in "my.cnf". To change it's default value, add: "ft_min_word_len = 3" to my.cnf under the [mysqld] section.
- After changing the value of ft_min_word_len, the server must be restarted.
- After changing the value of ft_min_word_len, any indexes you have must be rebuilt
- A fast way to rebuild an index is to
use this query: "REPAIR TABLE
your_table_name QUICK;" Note:
You're using the name of the table
only, not the name of any indexes.
If you have more than one index against the 'your_table_name' table, all of them will be re-built.
这篇关于在本地my.cnf中设置ft_min_word_len?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文