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 ...
随机推荐
- [Linux命令]tar命令
tar 命令的解释: tar(bsdtar): manipulate archive files First option must be a mode specifier: -c Create -r ...
- 邮件发送 EMailHelper
引用: using System; using System.Collections.Generic; using System.Linq; using System.Net; using Syste ...
- WINDOWS系统下环境变量PATH和CLASSPATH的意思
1 PATH 对于没有包含路径的命令,WINDOWS系统会默认去Windows 目录(C:\windows)和系统目录(C:\windows\system32)查找,如果没有找到,就去PATH变量内包 ...
- C#--接口的实现
接口: 不允许使用访问修饰符,所有接口成员都是公共的. 接口成员不能包含代码体. 接口不能定义字段成员. 接口成员不能使用关键字static,vritual,abstract,sealed来定义. 类 ...
- 更换ios 开发者账号与下载别人的代码 真机调试时注意切换
Buid Setting search sign
- phpmyadmin自增字段
自增字段必须为primary key 2种方法: 1- ALTER TABLE `qr_role` CHANGE `ROLE_ID` `ROLE_ID` INT(11) NOT NULL AUTO_I ...
- 分割gbk中文出现乱码的问题解决
近日遇到一个神奇的字“弢(tao)”. 具体的过程是这样的: $list = explode('|', 'abc弢|bc'); var_dump($list); 取得这个分割的结果. 和想象不同,结果 ...
- linux清理僵尸进程
查看服务器时发现好3个僵尸进程,僵尸进程存在好多天了,一直不会处理,留到了今天,顺便清理下僵尸进程吧 top命令中统计了僵尸进程,是第二行最后一项3 zombie. 或者使用下面的命令得到僵尸进程数量 ...
- PHP 中const 与define 区别
1.const用于类成员变量定义,一旦定义且不能改变其值.define定义全局常量,在任何地方都可以访问. 2.define不能在类中定义而const可以. 3.const不能在条件语句中定义常量 i ...
- 文成小盆友python-num3 集合,函数,-- 部分内置函数
本接主要内容: set -- 集合数据类型 函数 自定义函数 部分内置函数 一.set 集合数据类型 set集合,是一个无序且不重复的元素集合 集合基本特性 无序 不重复 创建集合 #!/bin/en ...