0

How to distribute an app desktop using Java and MySQL (and hibernate)? The biggest problem is how to create the schema automatically, I believe. I want to create an installer for my app, basically.

Thanks.

  • So you're going to install mysql on client's PC which will be used only by your application? Why not use some embedded database? – NeplatnyUdaj Apr 15 '19 at 14:48
  • But how to create the schema? – Juliano Rodrigo Lamb Apr 15 '19 at 14:50
  • Hibernate can do that for you: https://docs.spring.io/spring-boot/docs/current/reference/html/howto-database-initialization.html – NeplatnyUdaj Apr 15 '19 at 14:52
  • Is this an open source project oris it a commercial application? If the latter, theny ou need to purchase a commercial mysql license before you can distribute mysql with your application. – Shadow Apr 15 '19 at 15:52

1 Answers1

0

Well, I'm looking for some options, but I found somethig that solves my problem:

  1. hibernate can create schemas automatically (Hibernate auto create database) using

    createDatabaseIfNotExist=true&useUnicode=yes&characterEncoding=UTF-8
    
  2. MySql can be installed in silent mode (https://dev.mysql.com/doc/refman/5.5/en/windows-installer-msi-quiet.html)

    shell> msiexec /i mysql-5.5.65.msi /quiet
    

I'm looking now for packaging all of this (Is there a good alternative to Install Shield?). But, I consider the problem solved for me. Thanks for all.

EDIT: Inno will be the winner, for my problem (How to do a silent install of mysql in inno setup?)

EDIT2: Unfortunately, silent mode is not supported for the latest version of MySQL; at least not the way I expected. I got too close, but couldn't set all the parameters using the command line. As a final solution, I changed to another database with this support.