[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 KEYtitle
(title
), ADD FULLTEXT KEYlong_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?
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.)
Simple find in sql file ENGINE=InnoDB
replace with ENGINE=MyISAM
It’s working fine for me.