hibernate自动键表报MySQL server version for the right syntax to use near 'type=InnoDB' at line 1
来源:互联网 发布:软件测试方法和策略 编辑:程序博客网 时间:2024/05/16 09:30
在用hibernate自动生成表的时候发现报如下错误
[ERROR][2016-07-05 14:42:00] org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:213) 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 1
工作中使用sql语句建表时,发现如下错误:
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 1
二、解决方案:
这个报错是由于某些版本的mysql不支持type写法,将type关键词改成ENGINE 即可。
org.hibernate.dialect.MySQLInnoDBDialect(mysql5.0以前使用)改为
org.hibernate.dialect.MySQL5InnoDBDialect(mysq5.1-5.5)
或者直接写成
org.hibernate.dialect.MySQLDialect
1 0
- hibernate自动键表报MySQL server version for the right syntax to use near 'type=InnoDB' at line 1
- hibernate自动键表报MySQL server version for the right syntax to use near 'type=InnoDB' at line 7
- MySQL server version for the right syntax to use near 'type=InnoDB' at line 1
- MySQL server version for the right syntax to use near 'type = InnoDB' at line 25
- You have an error MySQL server version for the right syntax to use near 'TYPE=InnoDB' at line 20
- mysql报错:MySQL server version for the right syntax to use near 'type=InnoDB'
- your MySQL server version for the right syntax to use near 'NULL' at line 1
- MySQL server version for the right syntax to use near '-1.stu stu0_' at line 1
- Hibernate初运行异常---:MySQL server version for the right syntax to use near 'type=InnoDB'
- MySQL server version for the right syntax to use near 'info where info.stu_id = 1' at line 1
- MySQL server version for the right syntax to use near 'OPTION SQL_SELECT_LIMIT=DEFAULT' at line 1
- MySQL server version for the right syntax to use near ';) T' at line 7
- dbvis MySQL server version for the right syntax to use near 'OPTION SQL_SELECT_LIMIT=DEFAULT' at lin
- dbvis MySQL server version for the right syntax to use near 'OPTION SQL_SELECT_LIMIT=DEFAULT' at lin
- MySQL server version for the right syntax to use near 'OPTION SQL_SELECT_LIMIT=DEFAULT’
- corresponds to your MySQL server version for the right syntax to use near错误原因之一
- mysql ignore 不能执行MySQL server version for the right syntax to use near ignore问题
- java MySQL server version for the right syntax to use near
- 致我们终将组件化的web
- javascript中forEach
- openGL中矩阵相乘的顺序
- 三消游戏中重新刷块的bug记录
- 发送,取消notification,打开,关闭闪光灯。
- hibernate自动键表报MySQL server version for the right syntax to use near 'type=InnoDB' at line 1
- Matlab的GUI中figure的WindowButtonDownFcn与axes的ButtonDownFcn
- 如何自己动手实现 KVO
- 字符设备操作
- 进入docker容器推荐的方法
- 搭建你的Spring.Net+Nhibernate+Asp.Net Mvc 框架 (三)实现数据库接口层和业务逻辑层
- nginx配置笔记
- JBPM4.4数据库表结构
- Activity跳转效果