org.hibernate.exception.GenericJDBCException: Unable to open JDBC Connection for DDL execution

The issue

org.hibernate.exception.GenericJDBCException: Unable to open JDBC Connection for DDL execution issue happens when we tried to connect MySQL with our spring boot application.

Inside the application.properties we had to specify the MySQL server settings like this:

spring.datasource.url=jdbc:mysql://localhost:3306/springboot
spring.datasource.username=
spring.datasource.password=
spring.datasource.driver-class-name=com.mysql.jdbc.Driver

The solution

In our case the settings were wrong. When we ran the spring boot with the wrong settings we got the following error:
org.hibernate.exception.GenericJDBCException: Unable to open JDBC Connection for DDL execution

As soon as we corrected the MySQL server settings, the error was gone. When we ran the spring boot it worked and MySQL was conncted properly with our spring boot application.

Share