XAMPP MySQL - 设置 ft_min_word_len

XAMPP MySQL - Setting ft_min_word_len(XAMPP MySQL - 设置 ft_min_word_len)
本文介绍了XAMPP MySQL - 设置 ft_min_word_len的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的计算机上安装了 XAMPP,并通过它在本地主机上使用 MySQL 进行个人项目.

I have XAMPP installed on my computer, and am using MySQL through it on localhost for a personal project.

我正在尝试将布尔模式下全文搜索的 ft_min_word_len 变量从默认值 4 设置为 2.

I am trying to set the ft_min_word_len variable for fulltext searches in boolean mode to 2 from the default of 4.

我已经尝试过(在从 XAMPP 控制面板停止 MySQL 之后):

I've tried (after stopping MySQL from the XAMPP control panel):

  • 从 XAMPP 控制面板打开 Shell,并在提示符下输入:
    mysqld ft_min_word_len=2
    当我之后使用 mysqld --help --verbose 检查 ft_min_word_len 的值时,这似乎对 ft_min_word_len 没有任何影响(当我尝试使用 mysqladmin variables 时出现错误> 在提示符下).

  • Opening Shell from the XAMPP control panel, and typing at the prompt:
    mysqld ft_min_word_len=2
    This doesn't appear to have any effect on ft_min_word_len when I check its value afterwards with mysqld --help --verbose (I get an error when I try to use mysqladmin variables at the prompt).

使用以下文本在 XAMPPmysqlin 中创建一个 my.cnf 文件:
# MySQL 服务器
[mysqld]
ft_min_word_len=2
当我使用 mysqld --help --verbose 检查它的值时,这似乎改变了 ft_min_word_len 的值.
但是,当我从 XAMPP 的控制面板再次启动 MySQL,然后检查通过 PHPMyAdmin 使用 SHOW VARIABLES LIKE 'ft_min_word_len' 获取 ft_min_word_len 的值,在我重建全文索引之前和之后,它仍然是 4.

Creating a my.cnf file in XAMPPmysqlin with this text:
# The MySQL server
[mysqld]
ft_min_word_len=2
This does appear to change the value of ft_min_word_len when I check its value with mysqld --help --verbose.
However, when I start MySQL again from XAMPP's control panel, and then check the value of ft_min_word_len through PHPMyAdmin with SHOW VARIABLES LIKE 'ft_min_word_len', it is still 4, both before and after I rebuild the fulltext indexes.

在停止和启动 MySQL 之间,我已多次尝试每种方法.SHOW VARIABLES LIKE 'ft_min_word_len' 确实显示了 2 的值,但下次我停止并重新启动 MySQL 时,该值已恢复为 4,我无法再次将其设置为 2.

I've tried each approach multiple times, in between stopping and starting MySQL. SHOW VARIABLES LIKE 'ft_min_word_len' did show a value of 2 once, but the next time I stopped and restarted MySQL, the value had returned to 4, and I have been unable to set it to 2 again.

任何正确方向的指针将不胜感激.

Any pointers in the right direction would be appreciated.

推荐答案

my.cnf 文件保存在 mysqlin 文件夹中,然后重试.

Keep you my.cnf file in <XAMPP>mysqlin folder and try again.

这篇关于XAMPP MySQL - 设置 ft_min_word_len的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

Hibernate reactive No Vert.x context active in aws rds(AWS RDS中的休眠反应性非Vert.x上下文处于活动状态)
Bulk insert with mysql2 and NodeJs throws 500(使用mysql2和NodeJS的大容量插入抛出500)
Flask + PyMySQL giving error no attribute #39;settimeout#39;(FlASK+PyMySQL给出错误,没有属性#39;setTimeout#39;)
auto_increment column for a group of rows?(一组行的AUTO_INCREMENT列?)
Sort by ID DESC(按ID代码排序)
SQL/MySQL: split a quantity value into multiple rows by date(SQL/MySQL:按日期将数量值拆分为多行)