当运行hibernate的时候可能会出现一下错误:
WARN: GenerationTarget encountered exception accepting command : Error executing DDL via JDBC Statement
org.hibernate.tool.schema.spi.CommandAcceptanceException: Error executing DDL via JDBC Statement
com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: 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
那就说明你的MySQLInnoDBDialect和你的mysql数据库版本不匹配,如果你的是mysql5.7那就你就是MySQL5InnovationDBDialect
还有把hbm2ddl.auto的属性改为create
该博客有详细的述说:
http://blog.youkuaiyun.com/xiangwanpeng/article/details/53436279?locationNum=16&fps=1