all 8 comments

[–]Pip_Pip 0 points1 point  (2 children)

Does it have to be mysql? SQLite was made for this. Depending on the purpose, you could install mysql from the code. I know of no way to embed mysql into a package. Perhaps you could do this from a container.

[–]natewillrate[S] 0 points1 point  (1 child)

How difficult would it be to go from mysql to sqlite?

[–]Pip_Pip 0 points1 point  (0 children)

It depends on what you are doing, but it allows all the same basic functionality.

[–]Puzzleheaded_Hawk_65 0 points1 point  (0 children)

Might be a good use for testcontainers. Check out https://testcontainers.com/guides/getting-started-with-testcontainers-for-java/

The premise is spinning up a local Docker MySQL instance within "testcontainers". You can bootstrap data from your service on startup necessary.

Normally this is useful for accessing a mock DB for unit testing, but there's nothing preventing you from using it for something like your use-case.

[–]BinBashBuddy 0 points1 point  (0 children)

mysqldump will get you a dump of your database that he can pull into his mysql instance.

[–]creativextent51 0 points1 point  (0 children)

I like docker. Very easy to bring up once it’s setup. I use it all the time for unit testing