想解决这个问题很久了……
SELECT MATCH(name) AGAINST('абраксас')
(俄语)不起作用,但是
SELECT MATCH(name) AGAINST('abraxas')
(英语)完美地工作。
我知道这是字符集的问题,但我尝试了所有类型的设置,但没有成功。
现在它是latin-1。
LIKE 作品
这是与show variables
字符集相关的:
character_set_client - latin1
character_set_connection - latin1
character_set_database - latin1
character_set_filesystem - binary
character_set_results - latin1
character_set_server - latin1
character_set_system - utf8
character_sets_dir - /usr/share/mysql/charsets/
collation_connection - latin1_swedish_ci
collation_database - latin1_swedish_ci
collation_server - latin1_swedish_ci
/etc/my.cnf 的大块
default-character-set=latin1
skip-character-set-client-handshake
转储的大块:
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
DROP TABLE IF EXISTS `scenes_raw`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `scenes_raw` (
`scene_name` varchar(40) DEFAULT NULL,
...blabla...
) ENGINE=MyISAM AUTO_INCREMENT=901 DEFAULT CHARSET=utf8;
(我也做了没有跳过字符集客户端握手的测试)
SHOW TABLE STATUS WHERE Name = 'scenes_raw'\G
Name: scenes_raw
Engine: MyISAM
Version: 10
Row_format: Dynamic
Index_length: 23552
Collation: utf8_general_ci
Checksum: NULL
Create_options: