Can I change “ft_min_word_len” on shared hosting?

后端 未结 2 1395
迷失自我
迷失自我 2021-01-17 22:45

I have MySQL on shared hosting. Is there any way how to change value of ft_min_word_len without administrator access?

I found one workaround, where ever

相关标签:
2条回答
  • 2021-01-17 23:37

    Unfortunately, ft_min_word_len is a global system variable and cannot be set dynamically: see MySQL's online docs. Changing it would mean rebuilding every FULLTEXT index around, btw, so you can see why they don't want non-admins to mess with it.

    I fear your workaround (or something entirely equivalent) is the only way to solve the problem in your situation. Sorry! (But, compliments for thinking of it!).

    0 讨论(0)
  • 2021-01-17 23:38

    I know this is an old post but if someone has shell access to the server (even as non root) and mysql client tools you could do

    myisamchk --recover --ft_min_word_len=2 mytable.MYI
    

    Anyway you propably have to schedule this to run every day to include new values, too.

    0 讨论(0)
提交回复
热议问题