> For the complete documentation index, see [llms.txt](https://learnsql.gitbook.io/lernmysql/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://learnsql.gitbook.io/lernmysql/full-text-search/cau-hinh-file-my.cnf-de-su-dung-fulltext-search-voi-so-tu-tuy-chinh.md).

# Cấu hình file my.cnf để sử dụng fulltext search với số từ tùy chỉnh

I don't exactly remember where is it, but the file you want to change is : my.cnf. Most of the time he is located in /etc/my.cnf or /etc/mysql/my.cnf or directly in you datadir. Put this parameter below \[mysqld] and restart the service.

Edit : Maybe here : /opt/lampp/etc/my.cnf

Nội dung của file “my.cnf” như:

```
[mysqld]
innodb_ft_min_token_size=1
ft_min_word_len=1
```

&#x20;Để lấy được tham số về từ có bao nhiêu ký tự đang mặc định MySQL sử dụng, chúng ta chạy query sau:

```
SHOW VARIABLES LIKE "ft_min_word_%";
SHOW VARIABLES LIKE "innodb_ft_min_token_size%";
```

Link: <http://hoctuduylaptrinh.com/2016/12/31/xay-dung-mot-bo-may-tim-kiemsearch-engine-don-gian-bang-mysql/>
