使用 MySQL 版本 5.5.23-55 上传 SQL 脚本并使用 phpMyadmin 版本 3.4.11.1 导入时,我收到以下愚蠢的错误:
SQL查询:
CREATE TABLE `dp_banks` (
`id` int(11) NOT NULL auto_increment,
`owner` int(11) NOT NULL default '0',
`bname` varchar(128) NOT NULL default '',
`baddress` varchar(128) NOT NULL default '',
`bcity` varchar(64) NOT NULL default '',
`bzip` varchar(16) NOT NULL default '',
`bcountry` char(2) NOT NULL default '',
`bstate` varchar(32) NOT NULL default '',
`bphone` varchar(32) NOT NULL default '',
`bnameacc` varchar(128) NOT NULL default '',
`baccount` varchar(32) NOT NULL default '',
`btype` char(2) NOT NULL default '',
`brtgnum` varchar(9) NOT NULL default '',
`bswift` varchar(32) NOT NULL default '',
`status` tinyint(1) NOT NULL default '0',
`default` tinyint(1) NOT NULL default '0',
PRIMARY KEY (`id`)
) TYPE=MyISAM AUTO_INCREMENT=1 ;
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 'TYPE=MyISAM AUTO_INCREMENT=1' at line 19
在网上研究,我发现一篇文章建议更改TYPE=MyISAM
为ENGINE=MyISAM
. 现在进行此更改会产生以下错误:
SQL查询:
CREATE TABLE `dp_confirms` (
`id` int(11) NOT NULL auto_increment,
`newuser` varchar(32) NOT NULL default '',
`newpass` varchar(32) NOT NULL default '',
`newquestion` varchar(255) NOT NULL default '',
`newanswer` varchar(255) NOT NULL default '',
`newmail` varchar(255) NOT NULL default '',
`newfname` varchar(32) NOT NULL default '',
`newlname` varchar(32) NOT NULL default '',
`newcompany` varchar(128) NOT NULL default '',
`newregnum` varchar(32) NOT NULL default '',
`newdrvnum` varchar(32) NOT NULL default '',
`newaddress` varchar(128) NOT NULL default '',
`newcity` varchar(64) NOT NULL default '',
`newcountry` char(2) NOT NULL default '',
`newstate` varchar(32) NOT NULL default '',
`newzip` varchar(32) NOT NULL default '',
`newphone` varchar(64) NOT NULL default '',
`newfax` varchar(64) NOT NULL default '',
`sponsor` int(11) NOT NULL default '0',
`confirm` varchar(255) NOT NULL default '',
`cdate` timestamp(14) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `newuser` (`newuser`),
KEY `newmail` (`newmail`)
) ENGINE=MyISAM AUTO_INCREMENT=1 ;
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 '(14) NOT NULL, PRIMARY KEY (
id), UNIQUE KEY
新(
用户新用户), KEY ' at line 22
提前感谢所有帮助。