dedecms搬家时出现数据库导入失败的解决方法
<p style='margin: 0px; padding: 5px 0px; outline: none; font-size: 14px; line-height: 30px; font-family: tahoma, arial, "Microsoft YaHei";'>dedecms网站在搬家的时候,数据库导入常常会出现不成功的情况,并且总是提示dede_purview表有问题,下面就针对这一问题给出解决方法,提供给有需要的朋友参考一下。</p>
<p style='margin: 0px; padding: 5px 0px; outline: none; font-size: 14px; line-height: 30px; font-family: tahoma, arial, "Microsoft YaHei";'>
表`dede_purview`的结构如下:</p>
<p style='margin: 0px; padding: 5px 0px; outline: none; font-size: 14px; line-height: 30px; font-family: tahoma, arial, "Microsoft YaHei";'>
</p>
<div class="msgheader" style='margin: 3px auto 0px; padding: 0px 3px; outline: none; line-height: 21.6px; clear: both; border-width: 1px; border-style: solid; border-color: rgb(0, 153, 204); background: rgb(246, 251, 255); overflow: hidden; font-family: tahoma, arial, "Microsoft YaHei";'>
<div class="right">
<span><u>复制代码</u></span>
</div>
代码如下:</div>
<div class="msgborder" id="phpcode2" style='margin: 0px auto 3px; padding: 0px 3px; outline: none; line-height: 25.2px; font-size: 14px; clear: both; border-right: 1px solid rgb(0, 153, 204); background: rgb(221, 237, 251); overflow: hidden; border-left: 1px solid rgb(0, 153, 204); word-break: break-all; border-bottom: 1px solid rgb(0, 153, 204); word-wrap: break-word; font-family: tahoma, arial, "Microsoft YaHei";'>
CREATE TABLE IF NOT EXISTS `54cms_purview` (<br>
`mid` mediumint( 8 ) DEFAULT '0',<br>
`typeid` smallint( 5 ) DEFAULT '0',<br>
`rank` smallint( 6 ) DEFAULT NULL ,<br>
`pkey` varchar( 30 ) CHARACTER SET latin1 NOT NULL ,<br>
`pvalue` text NOT NULL ,<br>
KEY `pkey` ( `pkey` ) USING BTREE<br>
) ENGINE = MYISAM DEFAULT CHARSET = gbk;</div>
<p style='margin: 0px; padding: 5px 0px; outline: none; font-size: 14px; line-height: 30px; font-family: tahoma, arial, "Microsoft YaHei";'>
</p>
<p style='margin: 0px; padding: 5px 0px; outline: none; font-size: 14px; line-height: 30px; font-family: tahoma, arial, "Microsoft YaHei";'>
解决方法如下:</p>
<p style='margin: 0px; padding: 5px 0px; outline: none; font-size: 14px; line-height: 30px; font-family: tahoma, arial, "Microsoft YaHei";'>
把PHPMYADMIN导出的SQL文件内这一句里的:<font color="#ff0000">USING BTREE 去掉或者调换位置即可</font>,<br>
这是mysql server不兼容造成的。</p>
<p style='margin: 0px; padding: 5px 0px; outline: none; font-size: 14px; line-height: 30px; font-family: tahoma, arial, "Microsoft YaHei";'>
因此,上面的查询语句应该改成:</p>
<p style='margin: 0px; padding: 5px 0px; outline: none; font-size: 14px; line-height: 30px; font-family: tahoma, arial, "Microsoft YaHei";'>
</p>
<div class="msgheader" style='margin: 3px auto 0px; padding: 0px 3px; outline: none; line-height: 21.6px; clear: both; border-width: 1px; border-style: solid; border-color: rgb(0, 153, 204); background: rgb(246, 251, 255); overflow: hidden; font-family: tahoma, arial, "Microsoft YaHei";'>
<div class="right">
<span><u>复制代码</u></span>
</div>
代码如下:</div>
<div class="msgborder" id="phpcode3" style='margin: 0px auto 3px; padding: 0px 3px; outline: none; line-height: 25.2px; font-size: 14px; clear: both; border-right: 1px solid rgb(0, 153, 204); background: rgb(221, 237, 251); overflow: hidden; border-left: 1px solid rgb(0, 153, 204); word-break: break-all; border-bottom: 1px solid rgb(0, 153, 204); word-wrap: break-word; font-family: tahoma, arial, "Microsoft YaHei";'>
CREATE TABLE IF NOT EXISTS `54cms_purview` (<br>
`mid` mediumint( 8 ) DEFAULT '0',<br>
`typeid` smallint( 5 ) DEFAULT '0',<br>
`rank` smallint( 6 ) DEFAULT NULL ,<br>
`pkey` varchar( 30 ) CHARACTER SET latin1 NOT NULL ,<br>
`pvalue` text NOT NULL ,<br>
KEY `pkey` USING BTREE ( `pkey` ) <br>
) ENGINE = MYISAM DEFAULT CHARSET = gbk;</div>
<br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>保存之后再导入,问题解决!</span>
頁:
[1]