0

Server version:

mysql See 15.1 Distrib 10.1.26-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2

For the research that does just change the file /etc/mysql/my.conf and insert the new value, that's what I did.

Then according to a mysql documentation it is said:

There are several ways to see the names and values ​​of system variables: To see the values ​​and a server based on your compiled defaults and all the option files it reads, use this command: mysqld --verbose - - Help

That returns me:

...
ft-min-word-len 2
innodb-ft-min-token-size 2
...

Between when I'm doing a direct check in mysql I have the following return:

MySQL [(none)]> SHOW VARIABLES;

...
ft_min_word_len | 4
...
innodb_ft_min_token_size | 3

At first I researched I should change the file /etc/mysql/my.cnf, where it says:

# The MariaDB configuration file
#
# MariaDB / MySQL tools read configuration files in the following $
# 1. "/etc/mysql/mariadb.cnf" (this file) to set global defaults,
# 2. "/etc/mysql/conf.d/*.cnf" to set global options.
# 3. "/etc/mysql/mariadb.conf.d/*.cnf" to set options only for MariaDB.
# 4. "~ / .my.cnf" to set user-specific options.
Searching for the file containing as a command:

me @ me: / $ sudo find / -name "*.cnf" -print

/etc/mysql/conf.d/mysql.cnf
/etc/mysql/conf.d/mysqldump.cnf
/etc/mysql/mariadb.conf.d/50-server.cnf
/etc/mysql/mariadb.conf.d/50-mysql-clients.cnf
/etc/mysql/mariadb.conf.d/50-mysqld_safe.cnf
/etc/mysql/mariadb.conf.d/50-client.cnf
/etc/mysql/debian.cnf
/etc/mysql/my.cnf
/etc/mysql/mariadb.cnf
/etc/alternatives/my.cnf
/etc/ssl/openssl.cnf
/usr/share/ssl-cert/ssleay.cnf
/usr/lib/ssl/openssl.cnf
/var/lib/dpkg/alternatives/my.cnf

So I changed the archives:

/etc/mysql/mariadb.cnf

...
[mysqld]
innodb_ft_min_token_size = 2
ft_min_word_len = 2
...

/etc/mysql/conf.d/mysql.cnf

...
[mysqld]
innodb_ft_min_token_size = 2
ft_min_word_len = 2
...

/etc/mysql/mariadb.conf.d/50-server.cnf

...
[mysqld]
innodb_ft_min_token_size = 2
ft_min_word_len = 2
...

When, i cheking in mysql it returns the default values ​​4 and 3 instead of 2 for both.

Is there another way to set these values?

sorry my bad english

  • And you obviously restarted the mysql server after modifying the .cnf files? – dbdemon Feb 6 '18 at 14:59
  • @dbdemon Tks for atention for each edit i doing : sudo /etc/init.d/mysql restart... :.(.. I cant find my mistake second day in row with this problem... Is a GCP instance i dont know if change something... I install mysql with security_installation, create a new user... – MagicHat Feb 6 '18 at 15:05
  • ...But i have 1 dubit, what is that file ~/.my.cnf, becouse with the command: mysqld --help --verbose: Default options are read from the following files in the given order: /etc/my.cnf /etc/mysql/my.cnf ~/.my.cnf @dbdemon maybe i need change something in the last file, but i cant find him – MagicHat Feb 6 '18 at 15:06
  • ~/.my.cnf is optional, and in your home directory. It's only read by clients, so not useful for the problem you're describing here, I think. – dbdemon Feb 6 '18 at 15:18
  • See here and here for documentation about the two variables. And just a thought, if you go to the Linux shell and list the mysql processes, e.g. ps -ef | grep mysql, does that show these variables as part of the mysqld command? If so, I think the values given there will override anything you have in the config files. – dbdemon Feb 6 '18 at 15:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.