SeunMatt/mysql-backup4j

Empty database after import

DieterVDW opened this issue · 2 comments

Hi,

I was happy to find your tool to import a mysql dump, however after running the database is still empty?

Code I used:

    val ret = MysqlImportService.builder()
      .setJdbcConnString(container.jdbcUrl)
      .setUsername(container.username)
      .setPassword(container.password)
      .setDatabase(DATABASE_NAME)
      .setSqlString(dbDump)
      .importDatabase()

Not sure if user error or bug...

Hello @DieterVDW

Was the mysql dump from the msyql-backup4j library? The library can only import/process MySQL exports of itself.

Regards

@SeunMatt Aha yes that explains everything :) . I presumed it was a wrapper around mysqldump and I could use it to import mysqldump generated files, my bad!

I didn't expect the import process to return a 'true' / succeeded status in that case though, could be an improvement.