我在将数据导入数据库时​​运行基于脚本浏览器的安装时出错

时间:2016-06-22 05:23:16

标签: php mysql sql-server .htaccess

我在安装脚本时遇到错误它是基于浏览器的安装我做了第一步并写了数据库详细信息也正确但当脚本尝试将数据导入数据库时​​出现此错误:

Error running query : "CREATE TABLE `quizes` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, 
`topic` varchar(255) COLLATE utf8_unicode_ci ...". SQLSTATE[HY000]: 
General error: 1214 The used table type doesn't support FULLTEXT indexes 
(SQL: 
CREATE TABLE `quizes` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, 
`topic` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `image` varchar(255) 
COLLATE utf8_unicode_ci NOT NULL, `description` text COLLATE utf8_unicode_ci 
NOT NULL, `pageContent` text COLLATE utf8_unicode_ci NOT NULL, `type` 
varchar(255) COLLATE utf8_unicode_ci NOT NULL, `questions` text COLLATE 
utf8_unicode_ci NOT NULL, `results` text COLLATE utf8_unicode_ci NOT NULL, 
`ogImages` text COLLATE utf8_unicode_ci NOT NULL, `attempts` int(11) NOT 
NULL, `completions` int(11) NOT NULL, `active` tinyint(1) NOT NULL DEFAULT 
'0', `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', 
`updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `settings` 
text COLLATE utf8_unicode_ci NOT NULL, `category` smallint(6) DEFAULT NULL, 
PRIMARY KEY (`id`), KEY `quizes_created_at_index` (`created_at`), KEY 
`quizes_updated_at_index` (`updated_at`), KEY `quizes_topic_index` 
(`topic`), KEY `quizes_attempts_index` (`attempts`), KEY 
`quizes_completions_index` (`completions`), KEY `quizes_active_index` 
(`active`), FULLTEXT KEY `search` (`topic`,`description`) ) ENGINE=InnoDB 
AUTO_INCREMENT=33 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; )

这是脚本htaccess文件

<IfModule mod_rewrite.c>
    <IfModule mod_negotiation.c>
        Options -MultiViews
    </IfModule>

    RewriteEngine On

    # Redirect Trailing Slashes...
    RewriteRule ^(.*)/$ /$1 [L,R=301]

    # Handle Front Controller...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ index.php [L]
</IfModule>

网站位于根目录中,因此任何人都可以告诉我解决方案

2 个答案:

答案 0 :(得分:1)

您的数据库可能不支持全文索引。

尝试使用

  

ENGINE = MyISAM的

而不是

  

ENGINE = InnoDB的

答案 1 :(得分:-1)

我认为问题出在您现在使用的数据库驱动程序中。您的db驱动程序不支持创建特定索引,因为您可以看到创建FULLTEXT索引时出错。