简体   繁体   中英

MySQL error while importing database

#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' at line 8""

#
# Table structure for table 'members'
#

CREATE TABLE `members` (
`member_id` int(11) unsigned NOT NULL auto_increment,
`firstname` varchar(100) default NULL,
`lastname` varchar(100) default NULL,
`login` varchar(100) NOT NULL default '',
`passwd` varchar(32) NOT NULL default '',
PRIMARY KEY  (`member_id`)
) TYPE=MyISAM;



#
# Dumping data for table 'members'
#

INSERT INTO `members` (`member_id`, `firstname`, `lastname`, `login`, `passwd`)                   VALUES("1", "Jatinder", "Thind", "phpsense", "ba018360fc26e0cc2e929b8e071f052d");

Try using 'ENGINE' instead of 'TYPE' :

CREATE TABLE `members` (
 `member_id` int(11) unsigned NOT NULL auto_increment,
 `firstname` varchar(100) default NULL,
 `lastname` varchar(100) default NULL,
 `login` varchar(100) NOT NULL default '',
 `passwd` varchar(32) NOT NULL default '',
  PRIMARY KEY  (`member_id`)
 ) ENGINE=MYISAM;

For more information check the MySql Manual .

As far as I know 'TYPE' is deprecated.

The TYPE option was deprecated in MySQL 4 and removed in MySQL 5.5, so you probably want:

 CREATE TABLE `members` (
     `member_id` int(11) unsigned NOT NULL auto_increment,
     `firstname` varchar(100) default NULL,
     `lastname` varchar(100) default NULL,
     `login` varchar(100) NOT NULL default '',
     `passwd` varchar(32) NOT NULL default '',
      PRIMARY KEY  (`member_id`)
 ) ENGINE=MyISAM;

See the MySQL CREATE TABLE documentation for details.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM