MySQL server version for the right syntax to use near 'type=InnoDB' at line 1
转载请注明出处:http://blog.csdn.net/bettarwang/article/details/40180271
在执行一个Hibernate的演示样例时,配置了<property name="hibernate.hbm2ddl.auto">update</property>属性,可是自己主动建表却一直不成功,出错信息为:
ERROR: HHH000388: Unsuccessful: create table info_table (id integer not null auto_increment, title varchar(255), content varchar(255), primary key (id)) type=InnoDB
ERROR: 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的版本号问题导致的,实际上,在MySQL5.0曾经,type=InnoDB是有效的SQL语句,可是自己用的是MySQL5.5版本号,type=InnoDB不再有效了。
解决的方法就是改动hibernate.cfg.xml中的dialect属性,将
<property name="dialect">org.hibernate.dialect.MySQLInnoDBDialect</property>改动为
<property name="hibernate.dialect">org.hibernate.dialect.MySQL5InnoDBDialect</property>
再次执行,发现能够自己主动建表了。
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=MyISAM'
最近将一个版本为4.0.18-Max的MySQL数据库迁移到5.6.20-enterprise-commercial-advanced上.好吧,这是我迄今为止,见到过的最古老版本的MySQL数据库,这 ...
- ERROR: 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 7
问题: 使用hibernate4.1.1,数据库使用mysql5.1.30,使用hibernate自动生成数据库表时,hibernate方言使用org.hibernate.dialect.MySQLI ...
- C# Mysql 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 ????
有几年没用过MySql数据了,今天在使用C#访问MySql数据库时出现了一个小插曲. 错误提示: You have an error in your SQL syntax; check the man ...
- 遇到的check the manual that corresponds to your MySQL server version for the right syntax错误
遇到的check the manual that corresponds to your MySQL server version for the right syntax错误. 结果发现是SQL关键 ...
- MySql 执行语句错误 Err] 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
关于用Power Designer 生成sql文件出现 错误 [Err] 1064 - You have an error in your SQL syntax; check the manual ...
- MySQL遇到check the manual that corresponds to your MySQL server version for the right syntax错误
用MySQL新建了一个Order表,插入了一条数据.总是显示 You have an error in your SQL syntax; check the manual thatcorrespond ...
- 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 '
mysql中如果字段使用了关键字,在插入和更新时会提示 You have an error in your SQL syntax; check the manual that corresponds ...
- MySQL server version for the right syntax to use near ‘USING BTREE
转自:http://www.douban.com/note/157818842/ 有时导入mysql会提示如下错误: C:\Users\liqiang>mysql -uroot -paaaaaa ...
- MySQL check the manual that corresponds to your MySQL server version for the right syntax错误
地化GO的时候一直遇到一个错误就是check the manual that corresponds to your MySQL server version for the right syntax ...
随机推荐
- 开发日志_Jan.9
今天主要工作为修改昨天的碰撞引擎不符合预期的部分. 经过了昨天的工作,碰撞算法已经初见雏形.但是主要有两个问题: 碰撞反弹的方向与预期不符合 碰撞后球与机器人存在一个"黏在一起"的 ...
- $(document).ready(); $().ready(); $()
$(document).ready(function(){}); $().ready(function(){}); $(function(){}), 三者效果是一样的,在文档加载完成之后执行()中的代 ...
- oracle nvl()函数在使用中出现的问题
看一条sql select q.*, r.goods_name from (select nvl(t.goods_code, s.goods_code) goods_code, t.buy_open_ ...
- OC随笔一:类
总结: 在oc中,我们要整出一个类来,首先需要一个.h头文件和一个.m实现文件.一般我们创建的类都继承了根类,因为根类帮我们实现了很多实用的方法,而类里面会有变量(属性) .函数(方法) ...
- 12个用得着的JQuery代码片段
1. 导航菜单背景切换效果 在项目的前端页面里,相对于其它的导航菜单,激活的导航菜单需要设置不同的背景.这种效果实现的方式有很多种,下面是使用JQuery实现的一种方式: <ul id='nav ...
- JS将毫秒转换成时间格式
JavaScript Date(日期)对象 实例 getTime():返回从 1970 年 1 月 1 日至今的毫秒数. setFullYear(): 设置具体的日期. toUTCString():将 ...
- 如何使用JSONP
1.使用$.getJSON() $.getJSON(" http://跨域的dns/document!searchJSONResult.action?name1="+value1+ ...
- 用angularjs遇到的坑们
最近在用angularjs做一些东西,由于学艺不精,对angularjs了解不够,导致经常会不小心掉进一些自己挖的坑里(⊙_⊙),在这里记下来,谨防又踩. 1.angularjs ng-show no ...
- 【转】对ARM堆栈的理解
对ARM堆栈的理解 堆栈严格来说应该叫做栈,栈(Stack)是限定仅在一端进行插入或删除操作的线性表.因此,对栈来说,可以进行插入或删除操作的一端端称为栈顶(top),相应地,另一端称为栈底(bott ...
- Struts2学习笔记--Struts例子及开发流程
参考资料:http://blog.csdn.net/hntyzgn2010/article/details/5547753 http://chenlh.iteye.com/blog/464341 入门 ...