Search code examples
javaspring-boot

MySQL57Dialect has been deprecated; use org.hibernate.dialect.MySQLDialect instead


In my Java Spring Boot project I try to migrate User entity into mysql database.

When I mvn spring-boot:run, I see following warning:

HHH90000026: MySQL57Dialect has been deprecated; use org.hibernate.dialect.MySQLDialect instead

This is my application.properties:

spring.datasource.url=jdbc:mysql://localhost:3306/mydb?createDatabaseIfNotExist=true 
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.username=root
spring.datasource.password=root
spring.jpa.database=mysql

This is the dependency for mysql:

<dependency>
    <groupId>mysql</groupId>
    <artifactId>mysql-connector-java</artifactId>
</dependency>

What am I missing?


Solution

  • With the help of Raushan Kumar I solved the connection problem with:

    spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQLDialect