Hibernate4和Mysql5.1以上版本创建表出错 type=InnDB
2015-01-21 15:02
127 查看
错误信息:
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=InnoDB'
at line 8
解决:
发现是因为type=InnoDB在5.0以前是可以使用的,但5.1之后就不行了。如果我们把type=InnoDB改为engine=InnoDB就不会有这个问题。如果用Hibernate,自动帮我建表。只需要修改配置:hibernate.dialect=org.hibernate.dialect.MySQLInnoDBDialect修改为:hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect
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=InnoDB'
at line 8
解决:
发现是因为type=InnoDB在5.0以前是可以使用的,但5.1之后就不行了。如果我们把type=InnoDB改为engine=InnoDB就不会有这个问题。如果用Hibernate,自动帮我建表。只需要修改配置:hibernate.dialect=org.hibernate.dialect.MySQLInnoDBDialect修改为:hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect
相关文章推荐
- Hibernate4在MySQL5.1以上版本创建表出错 type=InnDB
- Hibernate4在MySQL5.1以上版本创建表出错 type=InnDB
- Hibernate和Mysql5.5创建表出错——type=InnDB/schema export unsuccessful
- 自动创建表出错 type=InnDB
- Hibernate和Mysql5.5创建表出错——type=InnDB/schema export unsuccessful
- 关于hibernate和mysql创建表报错 type=InnDB
- Mac系统下搭建Cocos2d-x开发环境及2.20以上版本如何创建HelloWorld
- NHibernate 3.2以上版本Unable to load type 'NHibernate.ByteCode.Castle.ProxyFactoryFactory
- NHibernate 3.2以上版本Unable to load type 'NHibernate.ByteCode.Castle.ProxyFactoryFactory .
- [转载]使用FastReport 3.0及以上版本创建动态报表的几个技巧
- Flash Builder导出发行版本出错:创建AIR出错:error306,Descriptor must support one of the following
- cocos2d-x2.2.2(2.1.4及以上版本) VS2012 创建跨平台项目秒杀方法
- 使用FastReport 3.0及以上版本创建动态报表的几个技巧(转)
- cocos2d-x2.2.2(2.1.4及以上版本) VS2012 创建跨平台项目秒杀方法
- 用MyEclipse8.5及以上版本创建webservice实例(入门级超简单)
- Xcode 创建 支持IOS4.3以上版本的应用的方法
- 使用Cordova 3.0(及以上版本) 创建安卓项目
- Sharepoint学习笔记---Upgrading&Version版本升级:Content Type Feature(一.创建和部署一个基本的Content Type Feature)
- Cocos2d-x 2.20及以上版本如何创建基于Lua的项目
- Oracle临时表的创建(要比SQLServer繁琐,而且8i以上的版本才支持)