`

报错Error executing DDL via JDBC Statement

阅读更多
使用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
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics