[Solved] The used table type doesn’t support FULLTEXT indexes

I import this table data into phpmyadmin:

CREATE TABLE IF NOT EXISTS `cms_books` (
  `id` bigint(20) NOT NULL,
  `title` varchar(255) COLLATE utf8_persian_ci NOT NULL,
  `seo_title` varchar(255) COLLATE utf8_persian_ci NOT NULL,
  `orginal_title` varchar(255) COLLATE utf8_persian_ci NOT NULL,
  `pub_type` tinyint(2) NOT NULL,
  `long_desc` longtext COLLATE utf8_persian_ci NOT NULL,
  `counter` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8;

and i see this error :

— Indexes for table cms_books

ALTER TABLE cms_books
ADD PRIMARY KEY (id), ADD FULLTEXT KEY title (title), ADD FULLTEXT KEY long_desc (long_desc);
MySQL said: Documentation

#1214 – The used table type doesn’t support FULLTEXT indexes

In localhost i add fulltext for title and long_desc so this worked but when i import i see this error. how do fix this error?

Solution #1:

You need to change your engine to MyISAM. FULL TEXT Search is supported after MySQL 5.

6 in INNODB. You can check it over here.

See the MYSQL Docs:

Full-text searches are supported for MyISAM tables only. (In MySQL 5.6
and up, they can also be used with InnoDB tables.)

Respondent: Perspolis
Solution #2:

Simple find in sql file ENGINE=InnoDB replace with ENGINE=MyISAM

It’s working fine for me.

Respondent: Rahul Tripathi
The answers/resolutions are collected from stackoverflow, are licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0 .

Leave a Reply

Your email address will not be published.