#1214—使用的表类型不支持全文索引。

时间:2022-09-17 21:47:30

I'm getting an error saying that the table type doesn't support FULLTEXT indices. How can I achieve this?

我得到一个错误的消息,表类型不支持全文索引。我如何做到这一点?

Here's my table:

这是我的表:

CREATE TABLE gamemech_chat (
  id bigint(20) unsigned NOT NULL auto_increment,
  from_userid varchar(50) NOT NULL default '0',
  to_userid varchar(50) NOT NULL default '0',
  text text NOT NULL,
  systemtext text NOT NULL,
  timestamp datetime NOT NULL default '0000-00-00 00:00:00',
  chatroom bigint(20) NOT NULL default '0',
  PRIMARY KEY  (id),
  KEY from_userid (from_userid),
  FULLTEXT KEY from_userid_2 (from_userid),
  KEY chatroom (chatroom),
  KEY timestamp (timestamp)
)  ;

*

*

4 个解决方案

#1


80  

Before MySQL 5.6 Full-Text Search is supported only with MyISAM Engine.

在MySQL 5.6之前,只支持使用ismyam引擎进行全文搜索。

Therefore either change the engine for your table to MyISAM

因此,可以将您的表的引擎更改为MyISAM。

CREATE TABLE gamemech_chat (
  id bigint(20) unsigned NOT NULL auto_increment,
  from_userid varchar(50) NOT NULL default '0',
  to_userid varchar(50) NOT NULL default '0',
  text text NOT NULL,
  systemtext text NOT NULL,
  timestamp datetime NOT NULL default '0000-00-00 00:00:00',
  chatroom bigint(20) NOT NULL default '0',
  PRIMARY KEY  (id),
  KEY from_userid (from_userid),
  FULLTEXT KEY from_userid_2 (from_userid),
  KEY chatroom (chatroom),
  KEY timestamp (timestamp)
) ENGINE=MyISAM;

Here is SQLFiddle demo

这是SQLFiddle演示

or upgrade to 5.6 and use InnoDB Full-Text Search.

或者升级到5.6,使用InnoDB全文搜索。

#2


15  

The problem occurred because of wrong table type.MyISAM is the only type of table that Mysql supports for Full-text indexes.

问题出现的原因是表类型错误。MyISAM是Mysql支持全文索引的唯一类型的表。

To correct this error run following sql.

要纠正这个错误,请按照sql执行。

 CREATE TABLE gamemech_chat (
  id bigint(20) unsigned NOT NULL auto_increment,
  from_userid varchar(50) NOT NULL default '0',
  to_userid varchar(50) NOT NULL default '0',
  text text NOT NULL,
  systemtext text NOT NULL,
  timestamp datetime NOT NULL default '0000-00-00 00:00:00',
  chatroom bigint(20) NOT NULL default '0',
  PRIMARY KEY  (id),
  KEY from_userid (from_userid),
  FULLTEXT KEY from_userid_2 (from_userid),
  KEY chatroom (chatroom),
  KEY timestamp (timestamp)
) ENGINE=MyISAM;

#3


6  

Only MyISAM allows for FULLTEXT, as seen here.

只有MyISAM允许全文,如图所示。

Try this:

试试这个:

CREATE TABLE gamemech_chat (
  id bigint(20) unsigned NOT NULL auto_increment,
  from_userid varchar(50) NOT NULL default '0',
  to_userid varchar(50) NOT NULL default '0',
  text text NOT NULL,
  systemtext text NOT NULL,
  timestamp datetime NOT NULL default '0000-00-00 00:00:00',
  chatroom bigint(20) NOT NULL default '0',
  PRIMARY KEY  (id),
  KEY from_userid (from_userid),
  FULLTEXT KEY from_userid_2 (from_userid),
  KEY chatroom (chatroom),
  KEY timestamp (timestamp)
) ENGINE=MyISAM;

#4


-5  

*************Resolved - #1214 - The used table type doesn't support FULLTEXT indexes***************

* * * * * * * * * * * * *解决- # 1214 -表类型不支持全文索引使用* * * * * * * * * * * * * * *

Its Very Simple to resolve this issue. People are answering here in very difficult words which are not easily understandable by the people who are not technical.

解决这个问题非常简单。人们在这里用非常难理解的语言来回答问题,这对于那些不懂技术的人来说是难以理解的。

So i am mentioning here steps in very simple words will resolve your issue.

所以我在这里用非常简单的语言提到步骤将解决你的问题。

1.) Open your .sql file with Notepad by right clicking on file>Edit Or Simply open a Notepad file and drag and drop the file on Notepad and the file will be opened. (Note: Please don't change the extention .sql of file as its still your sql database. Also to keep a copy of your sql file to save yourself from any mishappening)

1)。打开您的.sql文件与记事本右键单击文件>编辑或简单地打开一个记事本文件并拖放文件在记事本和文件将被打开。(注意:请不要更改文件的extension .sql,因为它仍然是您的sql数据库。也要保留一个sql文件的副本,以避免出现任何错误。

2.) Click on Notepad Menu Edit > Replace (A Window will be pop us with Find What & Replace With Fields)

2)。点击记事本菜单编辑>替换(一个窗口将弹出我们找到什么&替换字段)

3.) In Find What Field Enter ENGINE=InnoDB & In Replace With Field Enter ENGINE=MyISAM

3)。在查找输入引擎=InnoDB和替换字段输入引擎=MyISAM时

4.) Now Click on Replace All Button

4)。现在点击“替换”按钮

5.) Click CTRL+S or File>Save

5)。单击CTRL + S或文件>保存

6.) Now Upload This File and I am Sure your issue will be resolved....

6)。现在上传这个文件,我相信你的问题会得到解决....

#1


80  

Before MySQL 5.6 Full-Text Search is supported only with MyISAM Engine.

在MySQL 5.6之前,只支持使用ismyam引擎进行全文搜索。

Therefore either change the engine for your table to MyISAM

因此,可以将您的表的引擎更改为MyISAM。

CREATE TABLE gamemech_chat (
  id bigint(20) unsigned NOT NULL auto_increment,
  from_userid varchar(50) NOT NULL default '0',
  to_userid varchar(50) NOT NULL default '0',
  text text NOT NULL,
  systemtext text NOT NULL,
  timestamp datetime NOT NULL default '0000-00-00 00:00:00',
  chatroom bigint(20) NOT NULL default '0',
  PRIMARY KEY  (id),
  KEY from_userid (from_userid),
  FULLTEXT KEY from_userid_2 (from_userid),
  KEY chatroom (chatroom),
  KEY timestamp (timestamp)
) ENGINE=MyISAM;

Here is SQLFiddle demo

这是SQLFiddle演示

or upgrade to 5.6 and use InnoDB Full-Text Search.

或者升级到5.6,使用InnoDB全文搜索。

#2


15  

The problem occurred because of wrong table type.MyISAM is the only type of table that Mysql supports for Full-text indexes.

问题出现的原因是表类型错误。MyISAM是Mysql支持全文索引的唯一类型的表。

To correct this error run following sql.

要纠正这个错误,请按照sql执行。

 CREATE TABLE gamemech_chat (
  id bigint(20) unsigned NOT NULL auto_increment,
  from_userid varchar(50) NOT NULL default '0',
  to_userid varchar(50) NOT NULL default '0',
  text text NOT NULL,
  systemtext text NOT NULL,
  timestamp datetime NOT NULL default '0000-00-00 00:00:00',
  chatroom bigint(20) NOT NULL default '0',
  PRIMARY KEY  (id),
  KEY from_userid (from_userid),
  FULLTEXT KEY from_userid_2 (from_userid),
  KEY chatroom (chatroom),
  KEY timestamp (timestamp)
) ENGINE=MyISAM;

#3


6  

Only MyISAM allows for FULLTEXT, as seen here.

只有MyISAM允许全文,如图所示。

Try this:

试试这个:

CREATE TABLE gamemech_chat (
  id bigint(20) unsigned NOT NULL auto_increment,
  from_userid varchar(50) NOT NULL default '0',
  to_userid varchar(50) NOT NULL default '0',
  text text NOT NULL,
  systemtext text NOT NULL,
  timestamp datetime NOT NULL default '0000-00-00 00:00:00',
  chatroom bigint(20) NOT NULL default '0',
  PRIMARY KEY  (id),
  KEY from_userid (from_userid),
  FULLTEXT KEY from_userid_2 (from_userid),
  KEY chatroom (chatroom),
  KEY timestamp (timestamp)
) ENGINE=MyISAM;

#4


-5  

*************Resolved - #1214 - The used table type doesn't support FULLTEXT indexes***************

* * * * * * * * * * * * *解决- # 1214 -表类型不支持全文索引使用* * * * * * * * * * * * * * *

Its Very Simple to resolve this issue. People are answering here in very difficult words which are not easily understandable by the people who are not technical.

解决这个问题非常简单。人们在这里用非常难理解的语言来回答问题,这对于那些不懂技术的人来说是难以理解的。

So i am mentioning here steps in very simple words will resolve your issue.

所以我在这里用非常简单的语言提到步骤将解决你的问题。

1.) Open your .sql file with Notepad by right clicking on file>Edit Or Simply open a Notepad file and drag and drop the file on Notepad and the file will be opened. (Note: Please don't change the extention .sql of file as its still your sql database. Also to keep a copy of your sql file to save yourself from any mishappening)

1)。打开您的.sql文件与记事本右键单击文件>编辑或简单地打开一个记事本文件并拖放文件在记事本和文件将被打开。(注意:请不要更改文件的extension .sql,因为它仍然是您的sql数据库。也要保留一个sql文件的副本,以避免出现任何错误。

2.) Click on Notepad Menu Edit > Replace (A Window will be pop us with Find What & Replace With Fields)

2)。点击记事本菜单编辑>替换(一个窗口将弹出我们找到什么&替换字段)

3.) In Find What Field Enter ENGINE=InnoDB & In Replace With Field Enter ENGINE=MyISAM

3)。在查找输入引擎=InnoDB和替换字段输入引擎=MyISAM时

4.) Now Click on Replace All Button

4)。现在点击“替换”按钮

5.) Click CTRL+S or File>Save

5)。单击CTRL + S或文件>保存

6.) Now Upload This File and I am Sure your issue will be resolved....

6)。现在上传这个文件,我相信你的问题会得到解决....