---
title: "报错Error executing DDL via JDBC Statement"
author: "andrew7676"
date: "2019-02-17T12:22:53Z"
tags: []
categories: ["编程语言"]
slug: "error-executing-ddl-via-jdbc-statement"
draft: false
lastmod: "2019-02-15T14:00:08Z"
id: 2437608
url: "https://andrew7676.iteye.com/blog/2437608"
---

```报错

使用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

```