Change value of mysql system variable

0

Server version:

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

By searching I would just change the file /etc/mysql/my.conf and insert the new value, that's what I did.

Then according to the mysql documentation it is said:

  

There are several ways to view the names and values of system variables:   To see the values that a server will use based on its 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
...

However when I go directly to 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
#
# The MariaDB/MySQL tools read configuration files in the following orde$
# 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 MariaDB-only options.
# 4. "~/.my.cnf" to set user-specific options.

Finding the file containing the settings:

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

Then I changed the files mentioned:

/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
...

Still when czech in mysql it returns the default values 4 and 3 instead of 2 for both.

Is there another way to set these values?

    
asked by anonymous 06.02.2018 / 15:45

0 answers