我又遇到一个问题,dede数据库上传空间后模块访问出错。查了很久,发现是dede_purview表开始的表都没有上传成功。本来有86个表,结果传到第63个就表为止就终止了。最后发现是dede_purview表引起的问题。以下是解决办法
SQL 查询:
-- --------------------------------------------------------
--
-- 表的结构 `dede_purview`
--
CREATE TABLE IF NOT EXISTS `dede_purview` (
`mid` mediumint( 8 ) DEFAULT '0',
`typeid` smallint( 5 ) DEFAULT '0',
`rank` smallint( 6 ) DEFAULT NULL ,
`pkey` varchar( 30 ) CHARACTER SET latin1 NOT NULL ,
`pvalue` text NOT NULL ,
KEY `pkey` ( `pkey` ) USING BTREE) ENGINE = MYISAM DEFAULT CHARSET = utf8;
MySQL 返回:
#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 'USING BTREE
) ENGINE=MyISAM DEFAULT CHARSET=utf8' at line 7
●把USING BTREE 去掉, 这是mysql server不兼容造成的。
●语句应该改成:
CREATE TABLE IF NOT EXISTS `dede_purview` (
`mid` mediumint( 8 ) DEFAULT '0',
`typeid` smallint( 5 ) DEFAULT '0',
`rank` smallint( 6 ) DEFAULT NULL ,
`pkey` varchar( 30 ) CHARACTER SET latin1 NOT NULL ,
`pvalue` text NOT NULL ,
KEY `pkey` USING BTREE ( `pkey` )) ENGINE = MYISAM DEFAULT CHARSET = utf8;
建议在数据库备份后修改sql备份。以免上传后缺少再补上传数据库
|
|