I needed to change the value for the global variable ft_min_word_len
, so I tried this:
MySQL [(none)]> SELECT @@basedir; +-----------+ | @@basedir | +-----------+ | /mysql/ | +-----------+
Then:
sudo nano /etc/mysql/my.cnf [mysqld] ft_min_word_len = 2
I checked this by:
sudo mysqld --verbose --help
The result is
... ft-min-word-len 2 ...
Last, I restarted:
sudo /etc/init.d/mysql restart
However, if I check in MySQL now with:
MySQL [(none)]> SHOW VARIABLES LIKE 'ft_min_word_len';
The result is:
+-----------------+-------+ | Variable_name | Value | +-----------------+-------+ | ft_min_word_len | 4 | +-----------------+-------+
I dont know if the right syntax is ft_min_word_len
or ft-min-word-len
With the command:
MySQL [(none)]> SHOW VARIABLES;
The result is:
ft_min_word_len | 4
I need change that to 2.
I use debian from GCP, and MariaDB monitor shows Server version: 5.7.14-google-log (Google).
How can I modify ft_min_word_len
so that it’s 2 for all future restarts?