close

[Solved] How to fix “Error executing DDL ”alter table events drop foreign key FKg0mkvgsqn8584qoql6a2rxheq“ via JDBC Statement”

Hello Guys, How are you all? Hope You all Are Fine. Today I get the following error How to fix “Error executing DDL ”alter table events drop foreign key FKg0mkvgsqn8584qoql6a2rxheq“ via JDBC Statement” in java. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

How to fix “Error executing DDL ”alter table events drop foreign key FKg0mkvgsqn8584qoql6a2rxheq“ via JDBC Statement” Error Occurs?

Today I get the following error How to fix “Error executing DDL ”alter table events drop foreign key FKg0mkvgsqn8584qoql6a2rxheq“ via JDBC Statement” in java.

How To Solve How to fix “Error executing DDL ”alter table events drop foreign key FKg0mkvgsqn8584qoql6a2rxheq“ via JDBC Statement” Error ?

  1. How To Solve How to fix “Error executing DDL ”alter table events drop foreign key FKg0mkvgsqn8584qoql6a2rxheq“ via JDBC Statement” Error ?

    To Solve How to fix “Error executing DDL ”alter table events drop foreign key FKg0mkvgsqn8584qoql6a2rxheq“ via JDBC Statement” Error Just specify the dialect in your application.properties. For example, for MySQL 8:
    hibernate.dialect=org.hibernate.dialect.MySQL8Dialect

  2. How to fix “Error executing DDL ”alter table events drop foreign key FKg0mkvgsqn8584qoql6a2rxheq“ via JDBC Statement”

    To Solve How to fix “Error executing DDL ”alter table events drop foreign key FKg0mkvgsqn8584qoql6a2rxheq“ via JDBC Statement” Error Just specify the dialect in your application.properties. For example, for MySQL 8:
    hibernate.dialect=org.hibernate.dialect.MySQL8Dialect

Solution 1

In my case the problem why i got this exception was, that some tables had names which are reserved for postgreSQL. eg. “Like” or “User”. Changed name with:

@Table(name="likes") 

and it worked fine. Perhaps someone has the same problem.

Solution 2

Just specify the dialect in your application.properties. For example, for MySQL 8:

hibernate.dialect=org.hibernate.dialect.MySQL8Dialect

Summery

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you? Thank You.

Also, Read

Leave a Comment