<b>The problem:</b> I'm using mysql on one of my sites, and I need to
be able to set the ft_min_word_len to three characters.
<b>The reason:</b> We have an "Open Source License" database, where we
have a list of Open Source Licenses and information about them. Since
many of these licenses GNU, GPL, BSD, OSI, etc. are three characters
in length, we need the ability to search for these terms.
<b>The proposed solution:</b> Edit the my.cnf file.
<b>The problem with that solution:</b> The site in question is hosted
at Interland on the following:
Apache 2.0
PHP 4.3.10
MySQL 4.0.20
on FreeBSD 4.4
It is a shared server and does not have a /etc/my.cnf file. So I can't
edit anything there. I called Interland, and here is the progression
of what transpired over phone calls and emails
Ticket 1: They tell me to edit /etc/my.cnf. I look around, and cannot find it.
Ticket 2: I ask them where I can locate said file. I tell them I
understand that editing the file is not supported, but wonder if they
can just tell me where the file is. They say no and hang up.
Ticket 3: This person tells me to edit the my.cnf file. I tell them I
cannot find the file. After about 20 minutes on the phone they tell me
that since they do not support editing my.cnf, they cannot help me.
So, after reading http://dev.mysql.com/doc/mysql/en/fulltext-fine-tuning.html
I came to the conclusion (not sure if I'm even remotely correct here)
that I can create a my.cnf file in /etc/ and mysql will look to it and
will inherit the /etc/my.cnf directive and will be able to search on 3
characters. So I created the file and it looked like this:
Quote:
[mysqld]
ft_min_word_len=3
[myisamchk]
ft_min_word_len=3
I then restarted mysql and nothing changed. I expected it to either
take the ft_min_word_len change or hose the server somehow. But
nothing happened at all.
So, after all that explanation, I'm wondering what I can do to allow
searching 3 characters despite the restrictions I have on the shared
service. Thanks again for wading through all this.
<b>Postscript:</b>On some message boards, I've been advised to use the
following at the command line:
shell> mysql --ft_min_word_len=3
But I then get the error:
mysql: ERROR: unknown variable 'ft_min_word_len=3'
Same when I try shell> mysql --set-variable=ft_min_word_len=3
So to give a quick summary of my circuitous problem, I can't edit
my.cnf because it's not there. When I create the file with the options
above and restart the server/rebuild indexes, nothing happens. And
when I try the command line, I get an error. |