@
brader 不行啊,可能是因为你用的是 InnoDB ?
我的环境是:mysql5.7.20 ,MyISAM ,
配置是:ft_stopword_file = '',ngram_token_size = 2
CREATE TABLE `tmp` (`book_name` char(32) NOT NULL, FULLTEXT KEY `book_name` (`book_name`) WITH PARSER `ngram`) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;
insert into tmp values('你好,我的');
mysql> select book_name from tmp where match(book_name) against('"你好,"' in boolean mode) ;
+-----------------+
| book_name |
+-----------------+
| 你好,我的 |
+-----------------+
1 row in set (0.00 sec)
mysql> select book_name from tmp where match(book_name) against('"你好,我的"' in boolean mode);
Empty set (0.00 sec)
mysql> select book_name from tmp where match(book_name) against('"你好"' in boolean mode);
+-----------------+
| book_name |
+-----------------+
| 你好,我的 |
+-----------------+
1 row in set (0.00 sec)
就上边这三种情况,不知道为什么