.sql文件导入mysql出现错误,请高手指正

SETFOREIGN_KEY_CHECKS=0;--------------------------------Tablestructurefor`ps_admin`--... SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for `ps_admin`
-- ----------------------------
DROP TABLE IF EXISTS `xt_admin`;
CREATE TABLE `xt_admin` (
`id` smallint(6) NOT NULL auto_increment,
`username` char(20) NOT NULL,
`password` char(32) NOT NULL,
`encrypt` char(6) default NULL,
`issuper` tinyint(1) default '0',
`lastlogin` int(10) default NULL,
`ip` char(15) default NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `username` (`username`)
) TYPE=MyISAM;
-- ----------------------------
-- Table structure for `xt_loves`
-- ----------------------------
DROP TABLE IF EXISTS `xt_sms`;
CREATE TABLE IF NOT EXISTS `xt_sms` (
`smsid` int(10) unsigned NOT NULL AUTO_INCREMENT,
`mobiles` mediumtext NOT NULL,
`content` mediumtext NOT NULL,
`time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`username` char(20) NOT NULL,
`ip` char(15) DEFAULT NULL,
PRIMARY KEY (`smsid`)
) TYPE=MyISAM;
-- ----------------------------
-- Table structure for `xt_session`
-- ----------------------------
DROP TABLE IF EXISTS `xt_session`;
CREATE TABLE `xt_session` (
`sessionid` char(32) NOT NULL,
`userid` mediumint(8) unsigned NOT NULL default '0',
`ip` char(15) NOT NULL,
`lastvisit` int(10) unsigned NOT NULL default '0',
`roleid` tinyint(3) unsigned default '0',
`groupid` tinyint(3) unsigned NOT NULL default '0',
`m` char(20) NOT NULL,
`c` char(20) NOT NULL,
`a` char(20) NOT NULL,
`data` char(255) NOT NULL,
PRIMARY KEY (`sessionid`),
KEY `lastvisit` (`lastvisit`)
) TYPE=MEMORY;
-- ----------------------------
-- Table structure for `xt_settings`
-- ----------------------------
DROP TABLE IF EXISTS `xt_settings`;
CREATE TABLE `xt_settings` (
`name` varchar(32) NOT NULL default '',
`data` text NOT NULL,
PRIMARY KEY (`name`)
) TYPE=MyISAM;
INSERT INTO `xt_settings` (username,password) VALUES ('xunteng','354103573');
MyISAM' at line 11
Query OK, 0 rows affected, 1 warning (0.00 sec)
ERROR 1064 (42000): 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 9
Query OK, 0 rows affected, 1 warning (0.00 sec)
ERROR 1064 (42000): 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=
MEMORY' at line 14
Query OK, 0 rows affected, 1 warning (0.00 sec)
ERROR 1064 (42000): 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 5
ERROR 1146 (42S02): Table 'xtsms.xt_settings' doesn't exist
ERROR 1146 (42S02): Table 'xtsms.xt_settings' doesn't exist
mysql>
展开
 我来答
king7788520
2012-01-29 · TA获得超过262个赞
知道小有建树答主
回答量:120
采纳率:0%
帮助的人:152万
展开全部
你试试下面的语句行不行, TYPE=MyISAM是旧版本用的,5.1以后都用ENGINE=***了。
还是不行就查一下你的MySQL版本号(在MySQL命令行下输入status查看Server Version),咱再研究怎么回事。
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for `ps_admin`
-- ----------------------------
DROP TABLE IF EXISTS `xt_admin`;
CREATE TABLE `xt_admin` (
`id` smallint(6) NOT NULL auto_increment,
`username` char(20) NOT NULL,
`password` char(32) NOT NULL,
`encrypt` char(6) default NULL,
`issuper` tinyint(1) default '0',
`lastlogin` int(10) default NULL,
`ip` char(15) default NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `username` (`username`)
) ENGINE=MyISAM;
-- ----------------------------
-- Table structure for `xt_loves`
-- ----------------------------
DROP TABLE IF EXISTS `xt_sms`;
CREATE TABLE IF NOT EXISTS `xt_sms` (
`smsid` int(10) unsigned NOT NULL AUTO_INCREMENT,
`mobiles` mediumtext NOT NULL,
`content` mediumtext NOT NULL,
`time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`username` char(20) NOT NULL,
`ip` char(15) DEFAULT NULL,
PRIMARY KEY (`smsid`)
) ENGINE=MyISAM;
-- ----------------------------
-- Table structure for `xt_session`
-- ----------------------------
DROP TABLE IF EXISTS `xt_session`;
CREATE TABLE `xt_session` (
`sessionid` char(32) NOT NULL,
`userid` mediumint(8) unsigned NOT NULL default '0',
`ip` char(15) NOT NULL,
`lastvisit` int(10) unsigned NOT NULL default '0',
`roleid` tinyint(3) unsigned default '0',
`groupid` tinyint(3) unsigned NOT NULL default '0',
`m` char(20) NOT NULL,
`c` char(20) NOT NULL,
`a` char(20) NOT NULL,
`data` char(255) NOT NULL,
PRIMARY KEY (`sessionid`),
KEY `lastvisit` (`lastvisit`)
) ENGINE=MEMORY;
-- ----------------------------
-- Table structure for `xt_settings`
-- ----------------------------
DROP TABLE IF EXISTS `xt_settings`;
CREATE TABLE `xt_settings` (
`name` varchar(32) NOT NULL default '',
`data` text NOT NULL,
PRIMARY KEY (`name`)
) ENGINE=MyISAM;
INSERT INTO `xt_settings` (username,password) VALUES

('xunteng','354103573');
我叫闫大敏
2018-03-02 · 超过42用户采纳过TA的回答
知道小有建树答主
回答量:75
采纳率:75%
帮助的人:14.4万
展开全部
你好 , 看了一下 , 错误都出现在sql 语句中的 TYPE=MyISAM 或者 TYPE = MEMORY
上 ; 这条语句是指定数据库存储引擎的语句 ; 一般来说 MyISAM 就是默认引擎 , 将 "TYPE=MyISAM" 删除 , 就可以了 , 如果实在想要改为ENGINE=MyISAM 也可以 ;
TYPE = MEMORY 同理 ;
ps : 老版本的mysql 使用的为type 新版的使用 engine ;
应该能解决你的问题了;
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式