I am new to MySQL; recently I faced this problem while setting a new value for a system variable.
I tried:
mysql> set global innodb_ft_min_token_size = 6;
but I am getting this error:
ERROR 1238 (HY000): Variable 'innodb_ft_min_token_size' is a read only variable
Is there any way to change the read only permission? I read about InnoDB parameters but could not resolve the problem.
The site you linked contains all information needed:
System variables that are true or false can be enabled at server startup by naming them [...]
System variables that take a numeric value can be specified as --var_name=value on the command line or as var_name=value in option files.
Many system variables can be changed at runtime (see Section 5.1.5.2, “Dynamic System Variables”).
The innodb_ft_min_token_size
is not a dynamic variable so you will have to change the config file my.cnf
and add innodb_ft_min_token_size=6
. Alternatively you need to change the startup command of your MySQL server.
After the change you must restart your MySQL server.
Try this:
In /etc/mysql/my.cnf
file(location in your case could be different, do locate my.cnf
to find the location for your system), add/modify:
[mysqld]
innodb_ft_min_token_size = 2
to set the minimum limit to 2. Don't forget to restart the mysql server and rebuilding the fulltext index. For me, the following worked like a charm.
drop index index_stem on maps;
CREATE FULLTEXT INDEX index_stem ON maps(stem_value);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With