Hibernate dialect for MySQL 8?
MySQL8Dialect(org.hibernate.dialect.MySQL8Dialect) is available in hibernate bundle 5.3.1.Final. You can use:
org.hibernate.dialect.MySQL8Dialect
yes, For MySQL8, use org.hibernate.dialect.MySQL8Dialect
If you are using Gradle (e.g. for Grails) just configure:
in application.yml
dataSource:
...
driverClassName: com.mysql.cj.jdbc.Driver
dialect: org.hibernate.dialect.MySQL8Dialect
....
in build.gradle
dependencies {
...
runtime 'mysql:mysql-connector-java:8.0.17'
...
Pay attention on mysql-connector version and non-deprecated driver class name
I know this question is a couple of weeks old, but for completeness it appears Hibernate 5.3 does have a MySQL8 dialect
https://docs.jboss.org/hibernate/orm/5.3/javadocs/org/hibernate/dialect/package-summary.html
I have not used it, so I cannot comment on its quality, but the support appears to be there.
spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL8Dialect
spring.jpa.properties.hibernate.dialect.storage_engine=innodb
got from here