discuz 恢复网站1146错误 新建表语句错误原来是TYPE=MyISAM

1
2
3
4
5
6
7
8
DROP TABLE IF EXISTS pre_common_syscache;
CREATE TABLE pre_common_syscache (
  cname varchar(32) NOT NULL,
  ctype tinyint(3) unsigned NOT NULL,
  dateline int(10) unsigned NOT NULL,
  `data` mediumblob NOT NULL,
  PRIMARY KEY (cname)
) TYPE=MyISAM;

会提示 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’ at line ……

这个错误出现是由于MySQL创建表的写法 TYPE=MyISAM 太古老了,在MySQL 5.6.20上已经不支持了,这个应该在MySQL 5.1后的相关版本已经取消了支持,具体参考链接http://bugs.mysql.com/bug.php?id=17501,只能将mysqldump导出的脚本文件里面的TYPE=MyISAM 全部替换成ENGINE=InnoDB后,才会成功。

Read more: http://zctou.com/?p=1479#ixzz6GNzEmeSQ

Leave a Reply

You must be logged in to post a comment.

RSS feed for comments on this post. TrackBack URL