1

I received a MySQL dump made with MySQL dump 10.13 Distrib 5.7.23, for Win64 (x86_64) and I would like to use it in H2 in memory database. So I tried to import it directly in my spring-boot project by adding those options in the application.properties file:

spring.datasource.url=jdbc:h2:mem:testdb;MODE=MySQL;DB_CLOSE_DELAY=-1;INIT=runscript from './src/main/resources/H2Scripts/test.sql'
spring.jpa.database-platform=org.hibernate.dialect.MariaDBDialect
#spring.jpa.database-platform=org.hibernate.dialect.MySQL55Dialect

I tried many options but I still have errors at start-up of the application (this one is the first one but there is others coming in after):

LOCK[*] TABLES `ATTRIBUTE` WRITE"
Syntax error in SQL statement "

I have seen in this post here that there is a lot of database tools to do that, but I was wondering if some simple options during the dump or in the configuration file could have done the magic.

Xtof
  • 415
  • 5
  • 11

0 Answers0