欢迎加入JavaWeb开发交流群:群号:1062758224
hibernate自动建表报错:
13:42:44,398 ERROR SchemaUpdate:212 - Unsuccessful: create table office_form (id bigint not null auto_increment, title varchar(255), primary key (id)) type=InnoDB
13:42:44,430 ERROR SchemaUpdate: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
找了好久问题,最后发现是hibernate.cfg.xml文件中连接数据库语句的问题
将划线地方进行修改
再次执行建表语句,便不会再报错,建表成功。