ITeye博客

报错Error executing DDL via JDBC Statement

andrew7676 · 2019-02-17 12:22 · SpringBoot · 编程语言 · Markdown


使用SpringDataJPA总是创建hibernate_sequence表

[main] INFO  org.hibernate.dialect.Dialect - HHH000400: Using dialect: org.hibernate.dialect.MySQLDialect
[main] DEBUG org.hibernate.SQL - create table hibernate_sequence (next_val bigint) type=MyISAM
Hibernate: create table hibernate_sequence (next_val bigint) type=MyISAM
[main] WARN  o.h.t.schema.internal.ExceptionHandlerLoggedImpl - GenerationTarget encountered exception accepting command : Error executing DDL via JDBC Statement


针对一下情况:
@Id
@GeneratedValue
private Long id;

1. @GeneratedValue改用
@GeneratedValue(strategy = GenerationType.IDENTITY)

2. JPA增加配置
spring.jpa.database-platform=org.hibernate.dialect.MySQL5InnoDBDialect

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。