MYSQL中'TYPE=MyISAM'错误的解决方案

创建表的时候(Mysql版本:5.5.42):

create table if not exists users(
userId int(10) UNSIGNED  not null AUTO_INCREMENT,
userNmae varchar(50) not null,
userPass varchar(20) not null,
telNo varchar(20) not null UNIQUE,
sex enum('男','女') not null default '男',
birthday date not null default '0000-00-00',
PRIMARY key(userId),
index username (userName,userPass)
)type=MyISAM default CHARACTER set utf8 collate utf8_general_ci;

错误

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 default CHARACTER set utf8 collate utf8_general_ci'
 at line 1

TYPE=MyISAM 和 ENGINE=MyISAM 都是设置数据库存储引擎的语句 ,(老版本的MySQL使用TYPE而不是ENGINE(例如,TYPE = MYISAM)。 MySQL 5.1为向下兼容而支持这个语法,但TYPE现在被轻视,而ENGINE是首先的用法。 一般地,ENGINE 选项是不必要的;除非默认已经被改变了,MyISAM是默认存储引擎。
直接将原来TYPE=MyISAM 改成ENGINE=MyISAM 就可以了.

你可能感兴趣的:(MYSQL中'TYPE=MyISAM'错误的解决方案)