如何使用query(joomla)解决sql导入错误#1064

时间:2014-09-27 11:10:34

标签: mysql sql joomla

我想将我的sql导入我的主机,因为我删除了数据库和joomla,然后上传新的joomla网站,并在昨晚创建新的数据库和用户......

当我上传sql时,我使用此查询获得错误 #1064

CREATE TABLE IF NOT EXISTS `vnmbl_assets` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Primary Key',
`parent_id` int(11) NOT NULL DEFAULT '0' COMMENT 'Nested set parent.',
`lft` int(11) NOT NULL DEFAULT '0' COMMENT 'Nested set lft.',
`rgt` int(11) NOT NULL DEFAULT '0' COMMENT 'Nested set rgt.',
`level` int(10) unsigned NOT NULL COMMENT 'The cached level in the nested tree.',
`name` varchar(50) NOT NULL COMMENT 'The unique name for the asset.\n',
`title` varchar(100) NOT NULL COMMENT 'The descriptive title for the asset.',
`rules` varchar(5120) NOT NULL COMMENT 'JSON encoded access control.',
PRIMARY KEY (`id`),
UNIQUE KEY `idx_asset_name` (`name`),
KEY `idx_lft_rgt` (`lft`,`rgt`),
KEY `idx_parent_id` (`parent_id`)
) TYPE=MyISAM AUTO_INCREMENT=360 ;

MySQL said: Documentation
#1064 - You have an error in your SQL syntax;
        check the manual that corresponds to your MySQL server version
        for the right syntax to use
        near 'TYPE=MyISAM AUTO_INCREMENT=360' at line 14

当我更改' TYPE:MyISAM'到' ENGINE:MyIsam'错误有点少:

CREATE TABLE IF NOT EXISTS `vnmbl_finder_tokens` (
`term` varchar(75) NOT NULL,
`stem` varchar(75) NOT NULL,
`common` tinyint(1) unsigned NOT NULL DEFAULT '0',
`phrase` tinyint(1) unsigned NOT NULL DEFAULT '0',
`weight` float unsigned NOT NULL DEFAULT '1',
`context` tinyint(1) unsigned NOT NULL DEFAULT '2',
`language` char(3) NOT NULL DEFAULT '',
KEY `idx_word` (`term`),
KEY `idx_context` (`context`)
) TYPE=MEMORY

请帮我修理一下我的主人现在死了......

1 个答案:

答案 0 :(得分:0)

打开.sql文件,搜索“TYPE = MEMORY”并将所有内容替换为“ENGINE = MEMORY”